Lewis Hamilton ended his full testing debut for Ferrari in fifth as Formula One’s pre-season running fired up in Bahrain.