Leinster have confirmed Matt O'Connor has signed a three-year contract to leave Leicester Tigers and join the Irish giants as head coach.