Add "size" parameter to AppendBlockFile.

Extend AppendBlockFile with a new "size" parameter that is used to check
for disk space directly in the routine.  It is also verified that the
number of written bytes matches the size, but the size is not yet used
for anything else.  In the future, it will be used to preallocate the
block file in chunks.
Undo the change to make CheckDiskSpace static.

CheckDiskSpace is used also in init.cpp, so can't make it static.
Make AppendBlockFile extend the file in chunks.

Keep a number of "reserved" zero bytes at the end of the block files,
and if they are not enough in AppendBlockFile, always extend the file
size by a larger chunk.  This may prevent excessive fragmentation in
NTFS / Windows.
Use passed-in DatabaseSet in AppendBlockFile.

Instead of constructing a manual CTxDB object in AppendBlockFile, use a
passed-in one.  This seems to be less prone to dead-locks.
Merge pull request #66 from domob1812/fragmentation

Improve disk fragementation of block files
Port over initial UTXO DB changes from Namecoin.

Port over the initial commit to implement an UTXO DB from Namecoin.  It
can keep track of the UTXO set in ConnectInputs, but not yet in
DisconnectInputs.  Also includes listsinceblock.
Update the UTXO set in DisconnectInputs.

Also handle the UTXO set in DisconnectInputs.  Not yet really tested.
Remove duplicate listsinceblock, error from merge.
Fix rescanning for Huntercoin.

Fix differences between NMC and HUC in UTXO rescanning.  In particular,
add also the genesis block coinbase and process both block.vtx and
block.vgametx.
Update disaster chance script with some more experiments.
Introduce CUtxoEntry for more information.

Add a new class CUtxoEntry that is stored in the UTXO DB instead of
CTxOut's themselves.  This way, we can include more information --
everything that is needed in ConnectInputs, to be precise:  Height,
IsGameTx and IsCoinBase.
Use only UTXO set in ConnectInputs.

Don't load the previous tx at all in ConnectInputs, use only the
information present in the UTXO DB.
Get rid of CheckTransactionAtRelativeDepth.

Use the UTXO set height information instead of CheckTransactionAtRelative
depth in order to verify min confirmations on name_new and things like
that.
Allow premine coins to be spent "immature".

Disable the "coinbase maturity" checks for the premine coins.  The old
check didn't cover the genesis block, either.
Handle utxo.dat like blkindex.dat in CDB::Close.
Merge pull request #70 from domob1812/utxo

Experimental UTXO-based tx verification
Add cs_main lock to name_list.

Lock cs_main in name_list.  This prevents a potential deadlock, which
may occur when name_list is called in parallel to syncing.  name_list
used to lock the wallet and then wait on BDB's internal lock, while
updating the wallet with incoming blocks (CWallet::GetDebitInclName)
tried to lock cs_mapWallet while the DB was locked from the syncing
thread.
Disable name_list shortcut for pending names.

For names that have a pending wallet transaction, always do the "full
check" in name_list and don't try to shortcut them when all outputs are
spent.  Even the pending tx counts as "spending" of the outputs, while
it doesn't yet show up later for name_list, so that the name effectively
goes missing.
Improve performance of name_list.

Do some performance improvement for name_list:  Cache decoding of
name_update transactions in the CWalletTx class (in memory only) and use
the name index to find out about a tx's height instead of loading the
block header.
Merge pull request #71 from domob1812/name-list-master

Fix name_list.