Microsoft to lay off thousands in sales, marketing reshuffle