The High Court has upheld a breach of contract claim against a housing trust that demoted a Christian manager who said on Facebook that holding civil partnership ceremonies in churches is "an equality too far".