Right to freedom of Jewish worship at holy shrine ‘not absolute, and should be superseded by other interests, among them the safeguarding of public order,’ judge says in ruling