Use more function composition in the planning
Merge pull request #2150 from jakub-/planning-refactor

Use more function composition in planning
Introduce FunctionName

Only use ast.Identifier for identifiers - let FunctionInvocation use
FunctionName
Add pattern relationships to QueryGraph