Microsoft has named company veteran Satya Nadella as its next chief executive, and said founder Bill Gates will leave the chairman post to become technology adviser.