Layoffs at Sonos epitomize its bad year. Time will tell if the restructuring can help the company regain its direction.