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.
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)
Merge pull request #5093

4b0e2d7 Squashed 'src/leveldb/' changes from 7924331..7d41e6f (Pieter Wuille)
Add SCRIPT_VERIFY_SIGPUSHONLY (BIP62 rule 2)
Add SCRIPT_VERIFY_MINIMALDATA (BIP62 rules 3 and 4)

Also use the new flag as a standard rule, and replace the IsCanonicalPush
standardness check with it (as it is more complete).
Improve CScriptNum() comment

Edited-by: Pieter Wuille <pieter.wuille@gmail.com>
Ensure MINIMALDATA invalid tests can only fail one way

Removes the need for the 'negated' versions of the tests, and ensures
other failures don't mask what we're trying to test.