U.K. lawmakers voted to take control away from Boris Johnson's government, giving themselves the power to stop a no-deal Brexit.