cmd/blkidx: ensure that the database is closed on program exit
cmd/blkidx: nicer duplicate output
cmd/blkidx: fix build