Judge says ex-coach was within 'protected speech' in opposing trans athlete's inclusion in girls competition