Sam Lowes took his third pole of the season ahead of Rins and Zarco in a dramatic session that saw Tito Rabat crash.