stop T_IN/OUT/INOUT/STDIO typemaps leaking

These typemaps (which are ancient; mostly going back to 1994 or so)
each leaked a GV and an RV.
XS-Typemap/t/Typemap.t: avoid close warnings

This test creates some file handles and dups them using XS that
exercises the T_OUT etc typemaps. When the dup filehandle is implicitly
closed on scope exit, it warns, since the close fails:

    Warning: unable to close filehandle properly: Bad file descriptor

The close fails because the two file handles are sharing the same
underlying IoIFP/IoOFP and so the second of the two closes doesn't work.

Fix this by explicitly closing the handles.

(Note that until the previous commit that fixed a leak with these
typemaps, the warning wasn't coming  until global destruction, since the
new GV was being leaked.)