Microsoft Corp. is at the intersection of two troubling trends roiling the technology sector, which has the stock on track for its worst quarterly performance since the global financial crisis two decades ago.