Casey Stoner produced a stunning performance in qualifying to claim pole position for the first MotoGP race at Aragon.