Dennis Hauger took his first Formula 2 pole position in a dramatic qualifying session around Albert Park.