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.