Decouple CChain from mapBlockIndex
Move CBlockIndex, CChain and related code out of main
CMessageHeader sanity changes

- Remove spurious `pchCommand[1] = 1` in CMessageHeader()
- Make sure that pchCommand is zero-padded if length is shorter than
  COMMAND_SIZE
- Use strnlen to determine length of pcmCommand in GetCommand
depends: add the debug/release concept to depends
depends: add debug/release flags for linux/osx/win

Linux and mingw enable libstdc++ debugging for extra runtime checks. OSX
doesn't play nice, so don't enable it there.
depends: make sure openssl sees cppflags
depends: boost: build for debug or release as requested

Also hook up cppflags there, which was missing before.
depends: teach qt to honor debug/release

This means it also needs to honor our flags, so patch them in as necessary.
depends: give miniupnpc cppflags
depends: make LDFLAGS act like the other flags
depends: add docs for debug
depends: disable reduced exports for debug builds

Some debug options may not be compatible.
tests: don't split an empty string
script: don't read past the end
travis: use debug for one build

For the all-off build, enable the wallet and debug. This ensures that debug
options will catch wallet problems as well.

In order to make sure the no-wallet path is still tested, disable the wallet
in the other x86_64 build.
Add automatic script test generation, and actual checksig tests
Use a typedef for monetary values
LLu is standard, but not portable. use ULL
Merge pull request #4796

e8b5f0d Move CBlockIndex, CChain and related code out of main (jtimon)
6db83db Decouple CChain from mapBlockIndex (jtimon)
update license of compat and crypto

- change license to be just MIT for all files in compat and crypto
- also add missing header end comments
- ensure default header include style