Fixes error
Implement SI-style (thin space) thoudands separator
Show bitcoin quantities with full precision, even in the presence of trailing zeros
Merge remote-tracking branch 'upstream/master'

Conflicts:
	src/qt/overviewpage.cpp
	src/qt/transactiondesc.cpp
Remove unused fAlign argument from BitcoinUnits::format and friends
Add comments re BitcoinUnits::formatWithUnit/formatHtmlWithUnit
add GetRandBytes() as wrapper for RAND_bytes()

- add a small wrapper in util around RAND_bytes() and replace with
  GetRandBytes() in the code to log errors from calling RAND_bytes()
- remove OpenSSL header rand.h where no longer needed
move rand functions from util to new random.h/.cpp
make RandAddSeed() use OPENSSL_cleanse()

- removes the cstring include and is also used in RandAddSeedPerfmon()
Only remove actualy failed blocks from setBlockIndexValid
Introduce whitelisted peers.

This adds a -whitelist option to specify subnet ranges from which peers
that connect are whitelisted. In addition, there is a -whitebind option
which works like -bind, except peers connecting to it are also
whitelisted (allowing a separate listen port for trusted connections).

Being whitelisted has two effects (for now):
* They are immune to DoS disconnection/banning.
* Transactions they broadcast (which are valid) are always relayed,
  even if they were already in the mempool. This means that a node
  can function as a gateway for a local network, and that rebroadcasts
  from the local network will work as expected.

Whitelisting replaces the magic exemption localhost had for DoS
disconnection (local addresses are still never banned, though), which
implied hidden service connects (from a localhost Tor node) were
incorrectly immune to DoS disconnection as well. This old
behaviour is removed for that reason, but can be restored using
-whitelist=127.0.0.1 or -whitelist=::1 can be specified. -whitebind
is safer to use in case non-trusted localhost connections are expected
(like hidden services).
getblocktemplate: longpolling support
Add test for getblocktemplate longpolling
Only keep setBlockIndexValid entries that are possible improvements
Do not flush the cache after every block outside of IBD
-datadir is now allowed in config files
Clarify that redeemScript is often optional
[Qt] Fix segfault when launched with -disablewallet
[Qt] Fix No such slot UnitDisplayStatusBarControl::onDisplayUnitsClicked
Fix Watchonly: cs_main lock not held