Chaplain who was referred to terrorist watchdog over his sermon on sexual identity wins a double vindication