Shortest Path (single & all) from node to itself works unexpected - Bug #2987

- Fixed to return null if the start and end node is the same
- added unit test case to verify the correctness