Refactored map_foreach* functions.

Removed a lot of duplicated code.
Added some documentation & comments.
Merge pull request #66 from piotrhalaczkiewicz/blocklist

Refactored map_foreach* functions.
Pathfinding code cleanup.

Now uses binary heap defined in `db.h`.
Walk requests now use A* (hard) pathfinding only to match game client
behavior.
Added defines for movement cost.
Added some documentation & comments.
Merge pull request #65 from piotrhalaczkiewicz/pathfinding

Pathfinding code cleanup.
Merge branch 'master' of https://github.com/HerculesWS/Hercules into ghbb