Martin takes pole ahead of Bagnaia for Styrian MotoGP