Sir John Major, the former Conservative Prime Minister, has threatened to use the courts to try to stop the next prime minister from shutting down Parliament in order to force through a no-deal Brexit.