Microsoft profits soar days after announcing thousands of layoffs