Manchester United and Mauricio Pochettino have agreed a deal for him to become the club's next head coach.