The crisis-hit Welsh Rugby Union (WRU) has signed a legal agreement with the Equality and Human Rights Commission (EHRC) in a bid to tackle a “toxic” workplace culture.