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.
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
Merge pull request #3189

71ba467 [Qt] sendcoinsdialog: convert QMessageBox usage to message() (Philip Kaufmann)
Merge pull request #3159

9eb4ab6 transactionview: make exportClicked() use message() (Philip Kaufmann)
868d3ee transactionview: add message() signal (Philip Kaufmann)
Do not use the redundant BestInvalidWork record in the block database.

As block index entries have a flag for marking invalid blocks, the
'best invalid work' information can be derived from there. In addition,
remove the global from main.h
Make some globals in main non-public.

This means they are declared static, and their extern definition in
main.h is removed. Also moved CBlockIndexWorkComparator to the .cpp
file.
Merge pull request #3114

a616206 Give peer time-adjustment data an own lock (Pieter Wuille)
Merge pull request #3128

0056095 Show short scriptPubKeys correctly (Peter Todd)
22de68d Relay OP_RETURN TxOut as standard transaction type (Peter Todd)

Signed-off-by: Gavin Andresen <gavinandresen@gmail.com>
Merge pull request #3087

caca6aa Make some globals in main non-public. (Pieter Wuille)
85eb2ce Do not use the redundant BestInvalidWork record in the block database. (Pieter Wuille)
.gitignore: Simplify references to the same file in different directories

Unless a .gitignore pattern is anchored, it'll match in any directory, not juts at the top level.  Simplify .gitignore accordingly.
Merge pull request #3193 from joshtriplett/patch-1

.gitignore: Simplify references to the same file in different directories
Refactor: CTxMempool class to its own txmempool.{cpp,h}