Relay OP_RETURN TxOut as standard transaction type

Also fix decoderawtransaction to not show reqSigs or addresses for
nulldata txouts. (Previous version also left reqSigs uninitialized
mistakenly)
Show short scriptPubKeys correctly

Previously bitcoin-qt's -debug transaction info was showing CTxOut([error])

It is valid for a scriptPubKey to be any size, for example simply
OP_RETURN is valid and can be used to destroy a TXOUT to mining fees.
Give peer time-adjustment data an own lock

Instead of relying on cs_main (defined in a different module) to
prevent concurrent access to it.
Do not treat fFromMe transaction differently when broadcasting
Remove broken PrintWallet functionality
Use boost signals for callbacks from main to wallet
Break dependency of init on wallet.

This required some code movement (what was CWalletTx::AcceptToMemoryPool
doing in main?), and adding a few explicit includes that used to be
implicit through init.h.
walletview: make backupWallet() use GUIUtil::getSaveFileName()

- this allows removal of several Qt headers and makes use of a
  standardized function in GUIUtil
- adds selected path to the UI output
walletview: clarify 2 comments
fix wrong memcmp() usage in CKey::operator==

- add a check for CKey::size() of a and b (size can be 0 or 32)
- change the fixed value in memcmp() to use a.size() instead
- fixes #3090
Bug fix: CDataStream::GetAndClear() when nReadPos > 0

Changed CDataStream::GetAndClear() to use the most obvious
get get and clear instead of a tricky swap().

Added a unit test for CDataStream insert/erase/GetAndClear.

Note: GetAndClear() is not performance critical, it is used only
by the send-a-message-to-the-network code. Bug was not noticed
before now because the send-a-message code never erased from the
stream.
-fuzzmessagestest=N : randomly corrupt 1-of-N sent messages

I needed this to test the new "reject" p2p message, but it should be generally
useful for fuzz-testing network message handling code.
Merge pull request #3115 from sipa/walletmain

Interaction cleanups between main and wallet
Merge pull request #3173 from gavinandresen/fuzzmessages

-fuzzmessagestest=N : randomly corrupt 1-of-N sent messages
Merge pull request #3176 from Diapolo/key

fix wrong memcmp() usage in CKey::operator==
re-work -debug switch handling

- re-work -debug help message text
- make -debug log every debugging information again (even all categories)
- remove unneeded fDebug checks in front of LogPrint()/qDebug(), as that
  check is done in LogPrintf() when category is != NULL (true for all
  LogPrint() calls
- remove fDebug ONLY in code which is NOT performance-critical
- harmonize addrman category name
- deprecate -debugnet usage, should be used via -debug=net and remove the
  corresponding global
Merge pull request #3160 from Diapolo/walletview

[Qt] walletview: make backupWallet() use GUIUtil::getSaveFileName()
transactionview: add message() signal

- allow to use message() in transactionview by connecting to the
  message() signal in WalletView
transactionview: make exportClicked() use message()

- use message() for displaying success or failure of export
- rework the strings to be more detailed / informative
- additional small cleanups
[Qt] sendcoinsdialog: convert QMessageBox usage to message()

- add new processSendCoinsReturn() function, which parses the
  status of WalletModel::SendCoinsReturn and generates a pair consisting
  of a message and message flags
- result is we only need one emit message() call
- this change ensures that the GUI is shown for warnings/errors in
  sendcoinsdialog, because of message() taking care of that for modal
  messages
- changes 2 warning message into error messages and removed "Error:"
  in front of the actual error message string