Refactor buildCommanderTree to remove side effects
Refactor buildCommanderTree to remove side effects

With the new implementation, buildCommanderTree can be called
concurrently. This is important to allow async calls of update.

James-Yu/LaTeX-Workshop,James-Yu/LaTeX-Workshop,James-Yu/LaTeX-Workshop,James-Yu/LaTeX-Workshop,James-Yu/LaTeX-Workshop