Squashed 'src/leveldb/' changes from be1b0ff..be91006

936b461 Merge upstream LevelDB 1.13.
748539c LevelDB 1.13

git-subtree-dir: src/leveldb
git-subtree-split: be9100673b05cec1662a54d0b7a59e4317fdda86
Merge commit '1fbd2e1f87da297d8b95ff73ab9ad064207c16e0' into test
Explictly cast calculation to int, to allow std::max to work.
fix memory leak in CKey::SetCompactSignature()
Fix memory leak on exception in Key::SignCompact
listreceivedbyaddress now provides tx ids (issue #1149)
Updated help and tests for getreceivedby(account|address)
Check for correct genesis

At startup, check that the expected genesis is loaded. This should prevent
cases where accidentally a datadir from the wrong network is loaded
(testnet vs mainnet, e.g.).
Don't attempt to resize vector to negative size.
osx: make use of the 10.8+ user notification center to display growl like notifications

- if 10.8, use user notification center, if <10.8, use growl

Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
remove obsolete and unused typedef for Windows
Added NSHighResolutionCapable flag to Info.plist for better font rendering on Retina displays.
MaxOSX: settings fixes (#2371)

    - Launch-At-Startup implementation for mac
    - Remove "Window" tab in settings

    Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
Qt5 compatibility

This commit squashes all the changes in the Qt5 branch
relative to master.

Backward compatibility with Qt4 is retained.

Original authors:

- Philip Kaufmann <phil.kaufmann@t-online.de>
- Jonas Schnelli <jonas.schnelli@include7.ch>
osx: fix bitcoin-qt startup crash when clicking dock icon

Crash probably introduced by 4d17a1b0.
Inialize the window to NULL and verify it before use.
allow txindex to be removed and add a reindex dialog

- adds a reindex dialog for Bitcoin-Qt to change -txindex without the need
  to supply -reindex
- now also does a -reindex, when removing the -txindex switch
Initialize database before checking changed txindex

In case no database exists yet, and -txindex(=1) is passed, we currently first
check whether fTxIndex differs from -txindex (and ask the user to reindex in
that case), and only afterwards initialize the database. By swapping these
around (the initialization is a no-op in case the database already exists),
we allow it to be born in txindex mode, without warning.

That also means we don't need to check -reindex anymore, as the wiping/reinit
of the databases happens before checking.
Fix build date for from-tarball builds
README for contrib/debian
Log reason for non-standard transaction rejection

Conflicts:
	src/main.cpp

Rebased-from: cb3076a3daa68eebf19c681ab48a0c0d9f0ce7a5