Hagia Sophia spent almost 1,000 years as a cathedral before being converted into a mosque in 1453 and later a museum