Clean up CMerkleTx::SetMerkleBranch.

The case SetMerkleBranch(NULL) was never actually used, and thus the
involved code (loading the block from disk) can be removed and the
implementation simplified.
Decouple CChain from mapBlockIndex
Move CBlockIndex, CChain and related code out of main
Add warnings for autogen.sh. Fix AC_CONFIG_SRCDIR.
Update obsolete AC macros.
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
qt: Change splash screen to normal window

Makes it possible to move, minimize, unminimize the window while
Bitcoin Core is initializing.
[Qt] include and file header cleanup

- alphabetical ordering
- correct ordering own headers before normal headers etc.
Write fee estimate and peers files only when initialized

Fixes #4669.

Move the loading of addresses to StartNode() to make it more
self-contained.
Apply clang-format on some infrequently-updated files
build: fix release name strings for gitian builds

When building from a distdir as gitian does, checking for the .git dir
is not reliable. Instead, ask git if we're in a repo.
Fixing condition 'sabotaging' MSVC build
test: Fix DoS tests after c74332c

Fix data structure mismatch ... The mind boggles that they were still passing at all.
Also create pid file in non-daemon mode

Always make a pid file, not only when `-daemon` specified.

This is useful for troubleshooting, for attaching debuggers and loggers
and such.

- Write the pid file only after the datadir lock was acquired
- Don't create or remove a pid file on WIN32, and also don't show the option
Add warning about the merkle-tree algorithm duplicate txid flaw

Lots of people read the Bitcoin Core codebase to learn more about
crypto; better to warn about flaws explicitly so they don't blindly copy
the code for other uses and create broken systems.
Merge pull request #4933

20e01b1 Apply clang-format on some infrequently-updated files (Pieter Wuille)
Reserve only one network specific cached path per session
Remove CBaseChainParams::NetworkID()
Merge pull request #4950

33a2771 test: Fix DoS tests after c74332c (Wladimir J. van der Laan)
Fixing improper input syntax and failing bounds check