Fernando Alonso has been promoted to the front row of the grid for the Canadian GP after Nico Hulkenberg was penalised for driving too fast under red flags.