ui_interface: remove unused NotifyBlocksChanged signal
Create new signal for notification of new blocks.  Use w/ -blocknotify
build: add -DMINIUPNP_STATICLIB for new version

libminiupnpc changed their required static define to the much more sane
"MINIUPNP_STATICLIB". Sadly, they don't respect the old "STATICLIB" for
back-compat. Define them both since the old one didn't seem to be conflicting
anywhere.

Also go ahead and split out the cppflags so that they can be applied only where
they're needed. This will help us to build dll's from our libs without having
their import/export declspecs poisoned.
depends: bump openssl to 1.0.1i

This is the forward-port of bba01750226745d6666d587cabe57c321fde0875.
depends: bump miniupnpc to 1.9.20140701.

This is the forward-port of a9c6eef915ee264ccf4169d5e8769a6be1fa101a
Perform CVerifyDB on pcoinsdbview instead of pcoinsTip

Bypassing the main coins cache allows more thorough checking with the same
memory budget.

This has no effect on performance because everything ends up in the child
cache created by VerifyDB itself.

It has bugged me ever since #4675, which effectively reduced the
number of checked blocks to reduce peak memory usage.

- Pass the coinsview to use as argument to VerifyDB

- This also avoids that the first `pcoinsTip->Flush()` after VerifyDB
  writes a large slew of unchanged coin records back to the database.
Headers-first synchronization

Many changes:
* Do not use 'getblocks', but 'getheaders', and use it to build a headers tree.
* Blocks are fetched in parallel from all available outbound peers, using a
  limited moving window. When one peer stalls the movement of the window, it is
  disconnected.
* No more orphan blocks. At all. We only ever request a block for which we have
  verified the headers, and store it to disk immediately. This means that a
  disk-fill attack would require PoW.
* Require protocol version 31800 for every peer (released in december 2010).
* No more syncnode (we sync from everyone we can, though limited to 1 during
  initial *headers* sync).
* Introduce some extra named constants, comments and asserts.

This breaks reindexing, which cannot yet deal with out-of-order blocks on disk.
RPC additions after headers-first
Fix a few "Uninitialized scalar field" warnings

Fix a few warnings reported by Coverity.
None of these is critical, but making sure that class fields are
initialized can avoid heisenbugs.
add missing header end comments

- ensures a consistent usage in header files
- also add a blank line after the copyright header where missing
- also remove orphan new-lines at the end of some files
add missing copyright headers
cleanup include of assert.h
Merge pull request #4777

8bdd287 Fix a few "Uninitialized scalar field" warnings (Wladimir J. van der Laan)
build: Remove message about Ubuntu 13.10 when no boost sleep implementation found

It's only confusing people into thinking that they should mess with
boost versions, which should not be necessary to get bitcoind to work.

If there is a bug in the build system with autodetecting boost it needs
to be solved not worked around.
rpc: Compute number of confirmations of a block from block height

Currently this uses a CMerkleTx, but that makes no sense as we
have the CBlockIndex available. As noted by @jgarzik.
Move CMerkleTx to wallet.cpp/h

It is only used by the wallet so it has no place in main.
Merge pull request #4599
missing include boost/algorithm/string/replace.hpp
Merge pull request #4788
Merge pull request #4778