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

...sion trees. @jkbradley @mengxr @chouqin Please review this.
Could the chunk of code below be removed into another function so that it is not duplicated in binSeqOp?  The function could sit outside of findBestSplits().