Unions back a deal that gives NHS staff a minimum pay rise of more than 6% over three years.