Conservative mutiny ensures prime minister's first defeat in parliament, leaving Britain on the brink of an election.