Zillow Group Inc. reached a deal to sell about 2,000 homes from its ill-fated house-flipping program, the company’s biggest bulk sale as it starts unloading thousands of homes and terminates the business.