Margolis’ resignation comes amid a legal dispute between the city, Church of Scientology and Florida attorney general.