Royal Dutch Shell has agreed to buy the oil exploration company Cove Energy for £992 million as it looks to expand into East Africa in search of new energy reserves.