The Ottoman legal system accepted the religious law over its subjects. What did the Ottoman Empire attempt to balance in its legal policies?