Court dismisses teachers’ pressure group suit challenging transfers, judge terms lobby a ‘soap bubble’