In a last-minute appeal to Tory MPs before they began voting, the UK prime minister said she would step down before the next election.