js: dirty dijkstra single source shortest path (work in progress)