England's James Taylor has been forced to retire from cricket because of a serious heart condition at the age of 26.