Merge pull request #2569 from sipa/win1024fd

Allow select()ing up to 1024 file descriptors on Windows
Accept negative -par values to leave N CPUs free.
Merge pull request #2349 from dserrano5/master

Accept negative -par values to leave N CPUs free.
Thread-safety: use gmtime_r instead of gmtime
Add ExtractAffectedKeys to script

This function finds all keys affected by a particular output script,
supporting everything ExtractDestinations supports (pay-to-pubkey,
pay-to-pubkeyhash, multisig) and recurses into subscripts (P2SH).
Add GetKeyBirthTimes to wallet

Compute safe lower bounds on the birth times of all wallet keys. For
pool keys, the actually stored birth time is used. For all others,
the birth times are inferred from the wallet transactions.

Once support for generic key birth times is added, this function can
be used for one-time upgrading.
Add dumpwallet RPC

Produce a dump of all keys in a wallet, in a format compatible with
Bitcoin Wallet for Android and Multibit.