add peer to block and tx rejection debug messages.

ok @davecgh
Add createencryptedwallet support to btcctl.

This is a btcwallet extension and will not work when talking to btcd
or bitcoind.
Add createencryptedwallet to wallet request set.
Update for recent btcutil.Address API change.
Issue #90: Improve addblock logging by reporting every 10 seconds instead of X number of blocks

blockImporter now has these new properties:

txProcessed - number of transactions processed by the importer
lastHeight - height of the last imported block
lastBlockTime - block time of the last imported block
lastLogTime - last timestamp of when a progress message was shown

the p/progress option in addblocks now indicates how often you want the progress message to appear
Remove extraneous space and go fmt.
Correct the new addblock progress logging.

The code was not resetting the counters when logging a message, so the
stats kept increasing rather than showing the number of items processed
since the last log message.

This has been resolved by copying the log function directly from btcd and
modifying it slightly to work with the importer.
Expand btcctl RPC cert path to from config file.

This commit allows paths in the btcctl config file to use environment
variables and ~ as a shortcut for the home directory.

Closes #113.
Use increment on p.retryCount to make golint happy.
add --testnet and --wallet options to btcctl.
Closes #112
Use defaults in config struct for btcctl.

Rather than doing a lot of if/else in the configuration load for btcctl,
set the default for the RPC server to localhost and the RPC cert to the
btcd cert, then override them as needed depending on the --wallet and
--testnet flags.
Fix comment typo in addblock.
Introduce a chain state to block manager.

This commit introduces a chain state that is updated as blocks are
processed into the block chain instance associated with the block manager.

This has been done because btcchain is currently not safe for concurrent
access and the block manager is typically quite busy processing block and
inventory.  This approach allows fast access to most chain information in
a concurrent safe fashion.
Add new logging subsystem for mining related ops.

This commit adds a new logging subsystem named MINR which is used for
logging mining releated operations.
Add options to control block creation settings.

This commit adds three new options which are intended to to be used by the
upcoming mining-related block template creation code.
Add infrastructure for creating a block template.

This commit adds a new function named NewBlockTemplate along with
supporting infrastructure which is part of the core functionality needed
to support mining.

In particular the function creates a new block template which contains a
fully populated block with a zero nonce that is ready to be solved as well
as additional information regarding the fees and number of signature
operations for each transaction included in the block.  The specific
transaction selection logic mirrors the reference implementation.

Various cleanup and suggestions provided by @owainga.
Update for recent change to block manager FIFO.
Optimize calcPriority.

Suggested by @owainga.
Be specific about 1000 bytes for KB in relay fees.
Rename inputPriority to inputValueAge.

This is intended to make the distinction between a priority and the sum of
the the input values multiplied by their respective ages a little more
clear.

Suggested by @flammit.