Online retailer Wayfair announced it is reducing its workforce by 870 employees as sales have slowed after pandemic highs.