Lewis Hamilton survives collision to win fourth Formula One world title