A proposed deal that could lead to the United Kingdom leaving the European Union passed in Parliament on Tuesday, but was followed by another vote that failed.