Qatar has been forging an independent foreign policy since the discovery of gas and a palace coup.