School run by ‘Britain’s strictest head’ wins court case brought by a Muslim student against its policy on prayer rituals