Lewis Hamilton was handed a 10-second time penalty for leaving the track and gaining an advantage after his wheel-to-wheel clash with Max Verstappen.