[SPARK-3161][MLLIB] Adding a node Id caching mechanism for training deci...

...sion trees. @jkbradley @mengxr @chouqin Please review this.
I think that one good benefit of Decision Tree over NearestNeighbor, even in unpruned state, is the compactness of representation. It's still a lot less storage for models of decision trees, compared to having to store entire datasets.

But yea, it still suffers like a lot of other non-parametric algorithms (e.g. SVM, etc.) whose models grow proportionally to dataset sizes, especially if unpruned.