Enable tx replacement on testnet.

Tested: wrote a program that replaces a non-final tx and checked it against a bitcoind with this patch, replacement was successful.
Fix off-by-one errors in using IsFinal()

Previous AcceptBlock() and CreateNewBlock() didn't take into account the
fact that IsFinal() without any arguments tests if the transaction is
considered final in the *current* block, when both those functions
really needed to know if the transaction would be final in the *next*
block.

Additionally the UI had a similar misunderstanding.
Discourage fee sniping with nLockTime
Allow network activity to be temporarily suspended.

Added the function SetNetworkActive() which when called with argument set to false disconnects all nodes and sets the flag fNetworkActive to false. As long as this flag is false no new connections are attempted and no incoming connections are accepted. Network activity is reenabled by calling the function with argument true.
Add RPC command "togglenetwork" to toggle network activity temporarily.

RPC command "togglenetwork" toggles network and returns new state after command.
RPC command "getinfo" returns "networkactive" field in output.
Add gui feedback and control of network activity state.

Add getNetworkActive()/setNetworkActive() method to client model.
Send network active status through NotifyNetworkActiveChanged.
Indicate in tool tip of gui status bar network indicator whether network activity is disabled.
Indicate in debug window whether network activity is disabled and add button to allow user to toggle network activity state.
listtransactionsofblock added
wallettx GetDepthInMainChain take doublespend flag into consideration
Resolve path to allow for Bitcoin directory to be a symlink

Conditional use of fs::canonical only if using filesystem v3
delay confirmation if double spend detected
add ScanForDoubleSpends
add ScanForDoubleSpends
ScanForDoubleSpends fix for signature malleability
Merge remote-tracking branch 'upstream/master' into symlinks
always show wallet encryption commands in `help`

Hiding commands in the output of `help` based on user's current
configuration (the wallet is encrypted or not) can be confusing.
It doesn't seem to make sense to hide basic documentation from the
user in this way.
Bitcoin-Qt: updates to options handling code

- re-work options reset and require a client shutdown (as it is much
  easier to do it this way without having to mess with what can be changed
  on-the-fly and what needs a restart anyway)
- when changing an option which requires a client restart display a 10
  second warning message in statusLabel (via a QTimer)
- when applying the changes via ok or apply change that to a persistent
  message, which is displayed even after closing optionsdialog and re-open
  it, when no client restart was made
- remove dialog boxes used when changing language or proxy settings
- add setRestartRequired() and isRestartRequired() to OptionsModel and use
  the set function when updating options to signal OptionsDialog when a
  restart is needed
- re-work handling of language settings and move default language code
  into OptionsModel::getLanguage()
- move some disableApplyButton() calls in OptionsDialog up in the
  code to take directly effect
- resize optionsdialog a little and add some min sizes for certain GUI elements
ScanForDoubleSpends corrected malleability fix
Detect any sufficiently long fork and add a warning.

Such a fork is defined as being at least 7 blocks long and
having a tip which is within 72 blocks of our best block.
Call the -alertnotify script when we see a long or invalid fork.
Better warning/"alert" messages for large-work forks.