Tesco has said it will lift pay for shop workers by more than 5% over the next six months after reaching a deal with unions.