Joe Thompson says he retired from football following advice from his doctors after battling back from cancer twice.