Iran has carried out a ballistic missile attack on air bases housing US forces in Iraq, in retaliation for the US killing of General Qasem Soleimani.