Improvements in memory usage by NexSON exporter

These changes make incremental improvements in the memory usage (and speed) of the NexSON export.  Testing indicates that exporting via gzipped NexSON is more memory efficient, but slower than exporting uncompressed JSON.  Will keep this branch open to continue looking for improvements.