Mercedes' Valtteri Bottas says he surprised himself by taking pole in qualifying at the Mexico City GP.