Fix transaction tests

Conflict between low-s (6fd7ef2) and test updates in d3a33fc.
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
Merge pull request #4134

aa250f0 Remove NumBlocksOfPeers (Wladimir J. van der Laan)
Merge pull request #4076

397668e Deduplicate uint* comparison operator logic (Pieter Wuille)
df9eb5e Move {Get,Set}Compact from bignum to uint256 (Pieter Wuille)
a703150 Add multiplication and division to uint160/uint256 (Pieter Wuille)
4d480c8 Exception instead of assigning 0 in case of wrong vector length (Pieter Wuille)
eb2cbd7 Deduplicate shared code between uint160 and uint256 (Pieter Wuille)
Merge pull request #4102

21bf3d2 Add tests for BoostAsioToCNetAddr (Wladimir J. van der Laan)
fdbd707 Remove unused function WildcardMatch (Wladimir J. van der Laan)
ee21912 rpc: Use netmasks instead of wildcards for IP address matching (Wladimir J. van der Laan)
e16be73 net: Add CSubNet class for subnet matching (Wladimir J. van der Laan)
d864275 Use new function parseint32 in SplitHostPort (Wladimir J. van der Laan)
0d4ea1c util: add parseint32 function with strict error reporting (Wladimir J. van der Laan)
Reduce bignum.h now it is only needed for scriptnum_tests
Move bignum.h to test/
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
Merge src/leveldb changes for LevelDB 1.17.
fixes #4163