Split some things that were previously part of NIF_IO.h into their own files to make SWIG wrapping work better.