Swap directions in constants to the more-tradtional 'North is up'
Merge pull request #314 from ajps/restruct-direction-switcheroo

Swap directions in constants to the more-tradtional 'North is up'
Do some cppcheck-directed cleanup.

Tighten scopes for some variables, remove the unused adjust_panel(), remove
some other unused variables or assignments.
Added includes and fixed preprocessor macros so that main-stats and
wiz-stats compile.
Tidying of various tests to make them work with recent refactoring.
Merge pull request #315 from elly/cppcheck

Do some cppcheck-directed cleanup.
Merge pull request #316 from myshkin/restruct_stats_includes

Make --enable-stats build.
Merge pull request #317 from myshkin/restruct_tests

Fix tests