Use identity of the Expression AST Nodes for attaching type annotations

Previously this used equality, which could conflict and overwrite type
annotations. Using identity will also be more performant.

Resolves #2026
Reuse plan builder within a single compiler instance
Track symbol ast.Identifier nodes rather than just InputPosition

This is also cheaper than using a SortedSet
Use CypherFunSuite for SemanticStateTest
Merge pull request #2029 from cleishm/type-identity

Type identity
rewrite: extract parameters from literals