Iraq's parliament has voted in favour of a resolution to remove foreign troops from the country, in response to the US drone attack that killed top Iranian General Qassem Soleimani.