Refactor: Extract function: _build_xccdf_result_source
Refactor: Extract function: lookup_xccdf_ns
Make sure to create xccdf namespace if that is missing.

Addressing (validation of exported xmlDom):
File '/tmp/tmp.4h6LOGMsaX' line 0: Element 'status': This element is not
expected. Expected is ( {http://checklists.nist.gov/xccdf/1.1}status ).

We have never seen this error before until switching validation
from file to exported DOM. We have always created the DOM incorrectly
(i.e. without namespace). However, this error had never been exercised
because libxml exported nodes without namespace to the "parent/default"
namespace.
Make sure that xccdf:item gets always created with namespace

This avoids declaring namespace in each Benchmark's child.
Do not set namespace to Benchmark element. It already has one assigned.

Addressing:
OpenSCAP Error: File '/tmp/tmp.eufUBtxpsQ' line 0: Element 'Benchmark': No matching global declaration available for the validation root. [xccdf_session.c:350]

Interestingly, this error is also produced only when validating our DOM
prior the export.
Refactor: Declutter code and make it more compact and readable
Do not recreate xccdf namespace, just look it up.
Refactor: pass version_info downto xccdf_fix_to_dom()
Export <fix> element to the XCCDF namespace

Addressing (validation of DOM before export):
OpenSCAP Error: File '/tmp/test_xccdf_fix_attr_export.out.Dasz2C' line 1: Element 'fix': This element is not expected. Expected is one of (
{http://checklists.nist.gov/xccdf/1.2}status,
{http://checklists.nist.gov/xccdf/1.2}dc-status,
{http://checklists.nist.gov/xccdf/1.2}version,
{http://checklists.nist.gov/xccdf/1.2}title,
{http://checklists.nist.gov/xccdf/1.2}description,
{http://checklists.nist.gov/xccdf/1.2}warning,
{http://checklists.nist.gov/xccdf/1.2}question,
{http://checklists.nist.gov/xccdf/1.2}reference,
{http://checklists.nist.gov/xccdf/1.2}metadata,
{http://checklists.nist.gov/xccdf/1.2}rationale ).
Export <metadata> to XCCDF namespace

Addressing (validation prior export):
OpenSCAP Error: File '/tmp/test_xccdf_sub_title.res.CzgNxf' line 1: Element 'metadata': This element is not expected. Expected is one of (
{http://checklists.nist.gov/xccdf/1.2}metadata,
{http://checklists.nist.gov/xccdf/1.2}model,
{http://checklists.nist.gov/xccdf/1.2}Profile,
{http://checklists.nist.gov/xccdf/1.2}Value,
{http://checklists.nist.gov/xccdf/1.2}Group,
{http://checklists.nist.gov/xccdf/1.2}Rule,
{http://checklists.nist.gov/xccdf/1.2}TestResult,
{http://checklists.nist.gov/xccdf/1.2}signature ).