Companies that ramped up hiring in areas like technology over the past few years are cutting back as customers slow their spending.