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 or keys with metadata, the actually stored birth time is
used. For all others, the birth times are inferred from the wallet
transactions.
Add dumpwallet and importwallet RPCs

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

importwallet: import such a dump
Merge pull request #2592 from sipa/dumpwallet

Add dumpwallet and importwallet RPC commands