XML: Changed internal representation of attributes
As most elements have only a couple of attributes, I switched the
main attribute data structure from a hash table to a list. String
comparisons are hopefully avoided in most cases, as we keep a hash
of the lookup key in each entry.
More importantly, the structure is populated in two steps: first,
original (i.e., qualified) names of all attributes are entered;
second, namespaces are resolved and attributes are checked for
uniqueness.
If linear time complexity of attribute lookups turns out to be
too slow, we can add a secondary hash table for elements with
many attributes. This table will be populated from the list
in the 2nd step above.