MPs have voted in favour of military action against Islamic State militants in Syria, after a day of passionate debate in the House of Commons.