move collection-class to package ncbi, bit of cleanup; replace flatten() with generator function make_flattener()