Add NATIVE_WINDOWS

With a change of libs, and specifying NATIVE_WINDOWS as TARGET_OS it should compile libleveldb.a and libmemenv.a just fine, it did for me and Diapolo when testing.
Don't segfault if a lock file already exists for the Bitcoin directory
Add signfile/verifyfile RPC calls.

These calls can be used to generate and check signatures for arbitrary
(potentially binary) files, much like signmessage/verifymessage.

The client should hash the file locally then send a uint256 in hex form
as the 2rd parameter to signfile and the 3rd parameter to verifyfile.
let user select wallet file with -wallet=foo.dat
use std::string instead of psz for WalletFile
enhance proxy support / network init

- add -proxy6 to specify a SOCKS5 proxy for reaching IPv6 peers
- enhance control flow for proxy init code
- new init order Tor -> IPv6 -> Base proxy
- remove redundant .IsValid() checks
- don't set Tor proxy, when IsLimited(NET_TOR)
- don't allow SOCKS versions != 4 or != 5
- disable the usage of -proxy for Tor and IPv6, when SOCKS4 is used
- update parameter help messages to reflect changes and tweak them to
  be more clear
Normalize wallet RPC commands (refillkeypool, unlockwallet, lockwallet, setpassphrase)
Bitcoin-Qt: add a Reset button to the options dialog

- a press on Reset sets all options to the default values by removing all
  stored settings (QSettings), loading the defaults and saving them as
  the new settings
- special casing was needed for StartAtStartup
Change 'make' to $(MAKE) in leveldb make command line
EncodeBase58: don't convert little- to big-endian just to undo it
CBigNum: use BN_foo_word() where possible
add test of DecodeBase58 skipping whitespace
reimplement De-/En-codeBase58()

* Make use of faster word-sized bignum operators.
* Use table-lookup instead of linear search to
  find the value of a base58-digit.
* Explain base-58 encoding
optimize De-/En-codeBase58()

Convert chunks of digits at a time.
Bigger, but still readable code,
Additional speedup ~4.5
P2P, cosmetic: break out buffer send(2) code into separate function
P2P: improve RX/TX flow control

1) "optimistic write": Push each message to kernel socket buffer immediately.

2) If there is write data at select time, that implies send() blocked
   during optimistic write.  Drain write queue, before receiving
   any more messages.

This avoids needlessly queueing received data, if the remote peer
is not themselves receiving data.

Result: write buffer (and thus memory usage) is kept small, DoS
potential is slightly lower, and TCP flow control signalling is
properly utilized.

The kernel will queue data into the socket buffer, then signal the
remote peer to stop sending data, until we resume reading again.
P2P: parse network datastream into header/data components in socket thread

Replaces CNode::vRecv buffer with a vector of CNetMessage's.  This simplifies
ProcessMessages() and eliminates several redundant data copies.

Overview:

* socket thread now parses incoming message datastream into
  header/data components, as encapsulated by CNetMessage
* socket thread adds each CNetMessage to a vector inside CNode
* message thread (ProcessMessages) iterates through CNode's CNetMessage vector

Message parsing is made more strict:

* Socket is disconnected, if message larger than MAX_SIZE
  or if CMessageHeader deserialization fails (latter is impossible?).
  Previously, code would simply eat garbage data all day long.
* Socket is disconnected, if we fail to find pchMessageStart.
  We do not search through garbage, to find pchMessageStart.  Each
  message must begin precisely after the last message ends.

ProcessMessages() always processes a complete message, and is more efficient:

* buffer is always precisely sized, using CDataStream::resize(),
  rather than progressively sized in 64k chunks.  More efficient
  for large messages like "block".
* whole-buffer memory copy eliminated (vRecv -> vMsg)
* other buffer-shifting memory copies eliminated (vRecv.insert, vRecv.erase)
Add <= 80-byte OP_DROP multisig transactions as standard transactions.
TX_MULTISIG_DATA transactions always require a fee.
RPC: support simple wallet crypted key dump via GET /wallet-ckeys.json