Legislation for an early general election on December 12 has cleared the Commons after MPs voted in favour by 438 to 20, majority 418.