What was the highest ranked person in the Ottoman Empire until the 19th century