Ben Stokes retired from international cricket after the Test series against New Zealand, bringing the curtain down on one of the most remarkable careers in English cricket.