BUG: io.netcdf: do not close mmap if there are references left to it

Fixes gh-3630
XXX