From Spain to Syria, churches have been converted into mosques, and vice versa, as control over the sites have shifted over the centuries