build: quit abusing LIBS for Windows builds.

Similar to the INCLUDES changes in 6b099402b40, split out LIBS into individual
entries for more fine-grained control.

Also add MINIUPNPC_LIBS which was missing before, and hook it up to
executables.
build: fix libtool's refusal to link static libs into a dll
Squashed 'src/leveldb/' changes from 7924331..7d41e6f

7d41e6f Merge upstream LevelDB 1.18
803d692 Release 1.18

git-subtree-dir: src/leveldb
git-subtree-split: 7d41e6f89ff04ce9e6a742932924796f69c6e23d
Merge src/leveldb changes for LevelDB 1.18.
Add CValidationInterface::BlockChecked notification
Bugfix: submitblock: Use a temporary CValidationState to determine accurately the outcome of ProcessBlock, now that it no longer does the full block validity check
Rename RPC_TRANSACTION_* errors to RPC_VERIFY_* and use RPC_VERIFY_ERROR for submitblock
rpc: Fix leveldb iterator leak, and flush before `gettxoutsetinfo`

This fixes an iterator leak resulting in

    bitcoind: db/version_set.cc:789: leveldb::VersionSet::~VersionSet(): Assertion `dummy_versions_.next_ == &dummy_versions_' failed."

exception on shutdown.

Also make sure to flush pcoinsTip before calling GetStats() to make
sure we apply them to the current height.
boost: split stream classes out of serialize.h

serialization now has no dependencies.
Update license in pull-tester and rpc-tests

Add missing copyright/license header where necessary
Add doc/doxygen to .gitignore
Update comments in addrman to be doxygen compatible

Also correct the file license
Make CBlockIndex* returned by GetDepthInMainChain const.

Make the CBlockIndex* (optionally) returned by GetDepthInMainChain
const.  This prevents accidental modification.  The result is for
reading its properties rather than modifying it.
getblockhash: throw JSONRPCError (not runtime_error)
Start with tidier cache directories

Remove more files from the cached, 200-block-chain data directories.
[Qt] Remove CAmount from BitcoinAmountField Q_PROPERTY
Merge pull request #5117

7014f38 [Qt] Remove CAmount from BitcoinAmountField Q_PROPERTY (Cozz Lovan)
Merge pull request #5131

24f5c94 Update comments in addrman to be doxygen compatible (Michael Ford)
c772f4c Add doc/doxygen to .gitignore (Michael Ford)
Update comments in chain to be doxygen compatible
Update comments in chainparams to be doxygen compatible