Reject non-canonically-encoded sizes

The length of vectors, maps, sets, etc are serialized using
Write/ReadCompactSize -- which, unfortunately, do not use a
unique encoding.

So deserializing and then re-serializing a transaction (for example)
can give you different bits than you started with. That doesn't
cause any problems that we are aware of, but it is exactly the type
of subtle mismatch that can lead to exploits.

With this pull, reading a non-canonical CompactSize throws an
exception, which means nodes will ignore 'tx' or 'block' or
other messages that are not properly encoded.

Please check my logic... but this change is safe with respect to
causing a network split. Old clients that receive
non-canonically-encoded transactions or blocks deserialize
them into CTransaction/CBlock structures in memory, and then
re-serialize them before relaying them to peers.

And please check my logic with respect to causing a blockchain
split: there are no CompactSize fields in the block header, so
the block hash is always canonical. The merkle root in the block
header is computed on a vector<CTransaction>, so
any non-canonical encoding of the transactions in 'tx' or 'block'
messages is erased as they are read into memory by old clients,
and does not affect the block hash. And, as noted above, old
clients re-serialize (with canonical encoding) 'tx' and 'block'
messages before relaying to peers.
[Fee logic] Don't count txins for priority to encourage sweeping.

This changes the priority calculation to not include the size of per-txin
 data including up to 110 bytes of scriptsig so that transactions which
 sweep up extra UTXO don't lose priority relative to ones that don't.

I'd toyed with some other variations, but it seems like any formulation
 which results in an incentive stronger than making them not count will
 sometimes create incentives to add extra outputs so that you have
 extra inputs to consume later.  The maximum credit is limited so that
 users don't lose the disincentive to stuff random data in their
 transactions, the limit of 110 is based on the size of a P2SH
 redemption with a compressed public key.

This shouldn't need a staged deployment because the priority is not
 used as a relay criteria, only a mining criteria.
Remove CENT-output free transaction rule when relaying

Remove the (relay/mempool) rule that all outputs of free transactions
must be greater than 0.01 XBT. Dust spam is now taken care of by making
dusty outputs non-standard.
Lower maximum size for free transaction creation

Changes the maximum size of a free transaction that will be created
from 10,000 bytes to 1,000 bytes.

The idea behind this change is to make the free transaction area
available to a greater number of people; with the default 27K-per-block,
just three very-large very-high-priority transactions could fill the space.
wallet: remove automatic update of default key
Allow SendMessages to run partially without cs_main

SendMessages() tries to acquire a cs_main lock now, but this isn't nessecary
for much of its functionality. Move those parts out of the locked section,
so they can always be performed, and we hold cs_main for a shorter time.
Run node deletions outside of cs_vNodes
Push down cs_main locking in ProcessMessage
update default -rpcsslciphers to include TLSv1.2

- this extends the accepted ciphersuites with TLSv1.2 ones
- also removes !AH, as I could not find documentation on it and the change
  did not result in a changed ciphersuite list (checked via openssl
  ciphers -v)
- closes #3096 (which also contains more details)
Added better WalletTools description.
qt: merge walletstack and walletframe

There were too many levels of indirection here, and the functionality of
walletframe and walletstack can easily be merged. This commit
merges the two which cuts a lot of lines of boilerplate code.
paymentserver: style fixes / cleanup

- rename reportError() into message() to be in line with our default
  message() signal/slot naming (and can be used for all types of messages)
- rename some QStrings to not collide with message() function
- add a missing message for malformed URIs that IS also used in BitcoinGUI
- fix / extend some comments and misc style fixes
qt: remove awkward way of setting GUI pages

Selecting the button for a pages was going through bitcoingui->walletframe->walletview->bitcoingui.
Because of this, the actions for the pages had to be exposed on the BitcoinGUI object.
Make -DDEBUGLOCKORDER + -debug less noisy

Print out every mutex lock/unlock if compiled -DDEBUGLOCKORDER
only if -debug=lock is set.
Merge pull request #3008 from gavinandresen/CENTrule

Two small free transaction policy changes
Merge pull request #2884 from gavinandresen/canonicalsizes2

Reject non-canonically-encoded CompactSize
Merge pull request #2945 from gmaxwell/fee-logic_encourage_sweeping

[Fee logic] Don't count txins for priority to encourage sweeping.
Merge pull request #3106 from super3/master

Added better WalletTools description.
Changing LockedPageManager to use a managed instance

This ensures the allocator is ready no matter when it's needed (as
some STL implementations allocate in constructors -- i.e., MSVC's STL
in debug builds).

Using boost::call_once to guarantee thread-safe static initialization.

Adding some comments describing why the change was made.

Addressing deinitialization of the LockedPageManager object
by initializing it in a local static initializer and adding
an assert in the base's destructor.
Merge pull request #3109 from laanwj/2013_10_remove_walletstack

qt: merge walletstack and walletframe