Solves shortest path end points when they are missing

This commit solves a problem with patterns where only one side
of a shortest path is bound, Neo4j failed to build an execution
plan.
Merge pull request #3001 from systay/fix-shortest-path-builder

[2.0] Solves shortest path end points when they are missing