Added optional weight to A*

The static weight applied to the heuristic speeds up the algorithm by
allowing A* to search paths that are suboptimal, but no worse than (1+e)
where "e" is the weight supplied. When e = 1, it is the plain-old
vanilla optimal A*.