Remove tx from AlreadyAskedFor list once we receive it, not when we process it.
[Wallet] Improve ReorderTransactions(..)
build: osx: Fix incomplete framework packaging for codesigning

Starting with 10.9, Framework versions must be signed individually, rather
than as a single bundle version, in order to be properly codesigned. This
change ensures that the proper plist files and symlinks are present prior to
packaging.
contrib/linearize: Guarantee that output is generated in-order

This was typically ensured implicitly by virtue of normal bitcoind
operation.  Adding an explicit check provides a stronger guarantee, and
it is cheap to add.
contrib/linearize: split block files based on year-month, not just year
[Qt] Call checkBalanceChanged() periodically instead for every updated transaction
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.
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
[Qt] add all used colors in txtablemodel to guiconstants

- add colors used in TX status decoration
[Qt] simplify return code and return values in txtablemodel

- also move an added space in a string where it belongs
[Qt] minor watch-only changes

- use watch-only, not watchonly
- add back a tooltip hint when hovering addresses and attach
  "(watch-only)" at the end
Broken addresses on command line no longer trigger testnet.

When passing a bitcoin: URI on the command line, invalid addresses do not incorrectly send the
user to the test network.
Clean up CMerkleTx::SetMerkleBranch.

The case SetMerkleBranch(NULL) was never actually used, and thus the
involved code (loading the block from disk) can be removed and the
implementation simplified.
overhaul serialization code

The implementation of each class' serialization/deserialization is no longer
passed within a macro. The implementation now lies within a template of form:

template <typename T, typename Stream, typename Operation>
inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
    size_t nSerSize = 0;
    /* CODE */
    return nSerSize;
}

In cases when codepath should depend on whether or not we are just deserializing
(old fGetSize, fWrite, fRead flags) an additional clause can be used:
bool fRead = boost::is_same<Operation, CSerActionUnserialize>();

The IMPLEMENT_SERIALIZE macro will now be a freestanding clause added within
class' body (similiar to Qt's Q_OBJECT) to implement GetSerializeSize,
Serialize and Unserialize. These are now wrappers around
the "SerializationOp" template.
remove fields of ser_streamplaceholder

The nType and nVersion fields of stream objects are never accessed
from outside the class (or perhaps from the inside too, I haven't checked).
Thus no need to have them in a placeholder, whose only purpose is to
fill the "Stream" template parameter in serialization implementation.
rework overhauled serialization methods to non-static

Thanks to Pieter Wuille for most of the work on this commit.
I did not fixup the overhaul commit, because a rebase conflicted
with "remove fields of ser_streamplaceholder".
I prefer not to risk making a mistake while resolving it.