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

...sion trees. @jkbradley @mengxr @chouqin Please review this.
Yes, I noticed that you have a rule for determining the node indices through bit shifts. However, I was wondering if this is something that could potentially change in the future, and maybe leave that logic outside.

E.g. this seems to be a primary reason that 30+ level trees can't be trained at the moment and you might want to use a different logic in the future.