Kyrie Irving agrees to max deal with Cavaliers