A federal bankruptcy judge on Tuesday evening approved the sale of Genesis HealthCare and its nearly 300 subsidiaries to a newly formed investment group whose bid emerged as a surprise last week.