Move test function out of production code.
Changes
This MR moves a function that is exclusively used by the test file gstlal-spiir/lib/LIGOLw_xmllib/test/testWriter.c
into that file, and out of the production file gstlal-spiir/lib/LIGOLw_xmllib/LIGOLwWriter.c. This repeats all changes from !226 (closed) for these files.
Purpose
I intend to split !226 (closed)'s changes into a number of MRs, which won't be functional code versions themselves, but once complete will encompass the full set of changes to upgrade to py3.
This should provide useful code diffs for reviewers.