Microsoft to cut thousands of jobs across divisions