Sergio Perez surged past Ferrari's Charles Leclerc to make it a Red Bull one-two after 26 laps in Bahrain.