[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.
Instead of deleting this maybe something like: 

```scala
before.map(identity[Expression]).zip(after.map(identity[Expression])).foreach { case (b, a) => assert(b eq a) }
```

Perhaps with a comment: `// Ensure that the object after are the same objects before the transformation`