WeWork said its chief executive and chief financial officer both plan to step down.