The social-media giant’s planned cuts are expected to affect many thousands of its workforce, which exceeded 87,000 as of September.