test: Add compact test

Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
compact: Give user more feedback on failure renaming

Provide the user with instructions after we fail to move the old
un-compacted database out of the way.

Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
compact: Provide user with more error feedback

Provide instructions on what to do when we couldn't move the compacted
database into place.

Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
database: Handle error while deleting uncompacted database

We never checked to ensure that the rmtree() of the old database
succeeded.

Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>