Alastair Cook led England secured a nail-biting 22-run victory over Bangladesh following a man-of-the match performance by all-rounder Ben Stokes.