Leicester Tigers captain Geordan Murphy has announced he will retire from rugby at the end of the season and join the club's coaching staff.