cdx: ensure cdx file is closed when iterator is done, since cdx files
are opened per-lookup, related to #45