Religious schools claim 'major victory' after ruling on contraception mandate