Microsoft's rise and Apple's funk cause two most valuable companies to briefly swap spots