Sonos has revealed plans to lay off 7% of its workforce, and downsize its real estate presence, as the latest tech company to eliminate jobs.