Analysis: How Ferrari beat Mercedes to pole in Bahrain