Weighted astar

And while you are at it, here is a path that fixes the `x,y` vs `row,col` problem https://github.com/xtaci/algorithms/pull/19 and also add weight calculation to astar.