Microsoft Corp.’s data-center crunch will continue for longer than the company has previously outlined, underscoring the software giant’s struggles to keep up with cloud demand.