Enable maintainer mode checks in all builds of non-release versions.

Use new --release-mode option to disable.
Enable all the GCC warning flags, as we now require at least GCC 4.7 anyway

Fix a few nullptr and cast warnings.