[SPARK-3198] [SQL] Remove the TreeNode.id

Thus id property of the TreeNode API does save time in a faster way to compare 2 TreeNodes, it is kind of performance bottleneck during the expression object creation in a multi-threading env (because of the memory barrier). 
Fortunately, the tree node comparison only happen once in master, so even we remove it, the entire performance will not be affected.
Here is an example problem: If we have a tree with a join where the two sides of the join are structurally identical then we are never going to traverse one of the sides.