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