MPs have rejected crashing out of the European Union without a deal and will now vote on whether Parliament wants to seek an extension to Article 50.