Pathfinder cleanups and fixes.
Added preferStraightLines tie breaker (not used atm).
Added path smoothing based on Bresenham algorithm.