BUG io: fix file descriptor closing for netcdf variables

File descriptors created for each Variable stayed open when
using mmap

Closes gh-1555