Ensure proper ordering of XML arguments

Random hash ordering can cause the 'encoding' argument to be rendered
in the XML string before the 'version' argument, resulting in XML
deserialization errors on the Keystone side.  This modifies
Document's string rendering to not rely on dict ordering when
constructing the header tag's version + encoding arguments and avoids
XML auth issues when using PYTHONHASHSEED=random.

Change-Id: I66d18a2f8da1088ec5d310a43c84df7e4d6a6f6b
Merge "Ensure proper ordering of XML arguments"