A historic private school which closed suddenly, leaving hundreds of pupils displaced and 170 staff out of work, has been sold for £7.2 million.