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

...sion trees. @jkbradley @mengxr @chouqin Please review this.
Well, one requires zip and the other one doesn't,  so fundamentally changes the type of rows.

Additionally, I think if we just branch out within mapPartitions, won't it unnecessarily serialize some things that are not used in one branch and not the other? E.g. it seems that binSeqOp itself becomes object and will be serialized, along with closure items.