A Principled Framework for the Autonomy of Religious Communities