You do not elect a Prime Minister under the British Constitution. You elect your MP. The MP's in parliament then see which of them has sufficient support amongst the other MP's to appoint a government of ministers (the foreign secretary, the home secretary, the chancellor of the exchequer, the ministers of defence, health etc etc.) Obviously, the only person who can do this is the man or woman at the head of the party with the largest number of MP's, but if his own party think another person could do a better job - the prime minister will not have the support to continue. The party in power in Britain thought it's chances of staying in power would be better with another leader, because Blair had become unpopular both within the party and the country, largely because of his middle-east policies.
At no time did Britain go to war in Iraq to 'win against the terrorists'. The war was intended to remove the specific military threat posed by Saddam Hussein, specifically the threat of nuclear, biological and chemical weapons. That threat no longer exists.
The artificial state of Iraq was formed from three largely antagonistic provinces of the Ottoman Empire, and has fallen apart as might be expected. There is no point in remaining in the shia South, as the population do not want a foreign military presence there, and nobody is considering building an empire and adding Southern Iraq to it. The Kurdish North has no wish for or need for a foreign military involvement. This leaves the sunnis in the West and the Centre.
The question for the US is whether it intends to stay there for ever running the place as a small client state, or whether it has a clearly thought out plan to leave. It is unrealistic to suppose that any other countries will remain there with the US if it does not have its own aims and plans defined.
As for Gordon Brown - unfortunately any leader in a country which does not have an effective opposition might just as well be called a dictator, - elected or not. Time will tell.