tcbmgr: Sync DB before closing after import
BUG tcbmgr: Fix write_all
tcbmgr: Handle some of the review comments

See: https://github.com/Incubaid/tokyocabinet/commit/aa94cc6968d51c57fe62e2f2f449d1020497c05c