MPs have voted in favour of a bill to legalise assisted dying in England and Wales after five hours of passionate debate.