Also switch the (unused) verification code to low-s instead of even-s.

a81cd968 introduced a malleability breaker for signatures
(using an even value for S). In e0e14e43 this was changed to
the lower of two potential values, rather than the even one.
Only the signing code was changed though, the (for now unused)
verification code wasn't adapted.
Fix transaction tests

Conflict between low-s (6fd7ef2) and test updates in d3a33fc.
Remove NumBlocksOfPeers

Generally useless information. Only updates on connect time, not after
that. Peers can easily lie and the median filter is not effective in
preventing that.

In the past it was used for progress display in the GUI but
`CheckPoints::guessVerificationProgress` provides a better way that is now used.
It was too easy to mislead it. Peers do lie about it in practice, see issue #4065.

From the RPC, `getpeerinfo` gives the peer raw values, which are more
useful.
Deduplicate shared code between uint160 and uint256
Exception instead of assigning 0 in case of wrong vector length
Add multiplication and division to uint160/uint256
Move {Get,Set}Compact from bignum to uint256
Deduplicate uint* comparison operator logic
util: add parseint32 function with strict error reporting

None of the current integer parsing functions in util
check whether the result is valid and fits in the range
of the type. This is required for less sloppy error reporting.
Use new function parseint32 in SplitHostPort

Use the new function parseint32 in SplitHostPort instead of calling
strtol directly.
net: Add CSubNet class for subnet matching
rpc: Use netmasks instead of wildcards for IP address matching

`-rpcallowip` currently has a wacky wildcard-based format. After this
commit it will accept the more standard format, for example:

- Ranges with netmask 127.0.0.0/255.255.255.0, ::/0
- Ranges with cidr 12.3.4.5/24, 12:34:56:78:9a:bc:de:00/112
- Loose IPs ::1, 127.0.0.1

Trying to use the old *?-based format will result in an error message at
launch.
Remove unused function WildcardMatch

No longer necessary after implementing netmask-based matching.
Also remove a longer-unused function `skipspaces`.
Add tests for BoostAsioToCNetAddr
fixes #4163
Reduce bignum.h now it is only needed for scriptnum_tests
Move bignum.h to test/
Switch stdout to line buffering

Use line buffering (instead of block buffering) so that messages arrive
immediately in systemd-journald, tail -f debug.log, and the like.
Squashed 'src/leveldb/' changes from 9094c7f..7924331

42dcc7e Merge upstream LevelDB 1.17.
e353fbc Release LevelDB 1.17
269fc6c Release LevelDB 1.16
REVERT: 9094c7f Temporarily revert to writing .sst files instead of .ldb

git-subtree-dir: src/leveldb
git-subtree-split: 79243314e40ac31d79c68e5658a1d6a64800d50b
Move base58.h implementation code to base58.cpp