Move new addrmgr Options type and default to top.

Default values near the top of the file is preferrable so they are more
easily spotted.
Update unspentOutputs to remove spent unconfirmed outputs
Expose functions needed from the voting pool package
Address a couple of nits with recent En(De)crypt.

This commit adds comments about the specific crypto key types, moves the
selectCryptoKey function before the Encrypt/Decrypt functions that call it
to be more consistent with the rest of the code base, and slightly
modifies the verbiage of the comment.
Add the new ErrInvalidKeyType to the stringer map.

Also add it to the stringer test.
Updated VerifyMessage to not use the keystore
Implement new namespaced db package named walletdb.

This commit implements a new namespaced db package which  is intended to
be used be wallet and any sub-packages as its data storage mechanism.

- Key/value store
- Namespace support
- Allows multiple packages to have their own area in the database without
  worrying about conflicts
- Read-only and read-write transactions with both manual and managed modes
- Nested buckets
- Supports registration of backend databases
- Comprehensive test coverage
Add full test coverage suite for walletdb package.
Add examples for walletdb usage.
Add README.md for walletdb and bdb driver.
Add tests for new encryption API on the manager

100% coverage on selectCryptoKey, Encrypt, Decrypt.
Cleanup recent encrypt/decrypt test additions.

This commit cleans up the recent test addition for testing the positive
and negative error paths of the Encrypt and Decrypt functions.

In particular:

- Add comments to all new functions
- Close the manager before trying to delete the file which is otherwise in
  use
- Rename the temp prefix since these are not pool tests
- Rename setUp to setupManager to make it a bit more explicit what it's
  doing
Correct walletdb README.md example link.
Finish comment in walletdb namespace example.
Convert waddrmgr to new walletdb package.

This commit converts the waddrmgr package to use the new walletdb package
semantics.

Since waddrmgr no longer controls the database, it is unable to make a
copy of the database and return it as the old ExportWatchingOnly function
required.  As a result, it has been renamed to ConvertToWatchingOnly and
it now modifies the namespace provided to it.  The idea is that the caller
which does control the database can now make a copy of the database, get
the waddrmgr namespace in the database copy and invoke the new function
to modify it.  This also works well with other packages that might also
need to make modifications for watching-only mode.

In addition, the following changes are made:

- All places that worked with database paths now work with the
  walletdb.Namespace interface
- The managerTx code is replaced to use the walletdb.Tx interface
- The code which checks if the manager already exists is updated to work
  with the walletdb.Namespace interface
- The LatestDbVersion constant is now LatestMgrVersion since it no longer
  controls the database
Move keystore to legacy directory.
Switch to new waddrmgr package

This commit converts the wallet to use the new secure hierarchical
deterministic wallet address manager package.

The following is an overview of modified functionality:

- The wallet must now be created before starting the executable
- A new flag --create has been added to create the new wallet using wizard
  style question and answer prompts
- Starting the process without an existing wallet will instruct now
  display a message to run it with --create
- Providing the --create flag with an existing wallet will simply show an
  error and return
Add conversion from legacy txstore if it exists.
Integrate walletdb and updated waddrmgr.

This commit converts the wallet to use the new walletdb package as well as
the updated version of the secure hierarchical deterministic wallet
address manager which uses the new namespace feature provided by waleltdb.
Address some review items.

- Distinguish between missing address and database error
- Wrap help text for wallet generation seed
- Don't rescan if there are no addresses
- Update --create message for legacy wallet import