How did the Byzantine Empire manage to survive clashes within the Christian Church, and with other religions?