Wayfair said it would cut 340 jobs and use generative artificial intelligence to increase productivity following the company’s transfer of its technology resources to a cloud-computing environment.