Fix FILE* resource leak in agwrite() wrapper (#585)
The output_file typemap was using fdopen(fd, mode) without dup(), causing the underlying file descriptor to be shared with Python file object. When the FILE* was not explicitly closed, this led to file descriptor exhaustion after ~512 write operations on Windows.
Apply the same fix pattern used for agread() in PR #415/#432: use fdopen(dup(fd), mode) to duplicate the file descriptor, and add fclose() via typemap(freearg) to properly release resources. The freearg includes a NULL guard since gvRender’s output_file parameter is optional.
Both agwrite() and gvRender() wrappers are fixed since they both use the FILE* output_file typemap.
Co-authored-by: Yatin Tekumalla ytekumalla@nvidia.com