Ensure InputTokens in the AST do not affect equality

Also:
- Use Option[Identifer] to indicate named vs anonymous nodes / rels in AST
- Use boolean to indicate DISTINCT closing clauses
- Ensure stateless building of legacy Query
Add additional tests
Merge pull request #1835 from cleishm/ast

Ensure InputTokens in the AST do not affect equality