Fix XMLSerializer for namespaced attributes without prefixes.

XMLSerializer currently emits the namespaces of prefix-less attributes
as naked xmlns attributes. This is incorrect, because prefix-less
attributes are always parsed as belonging to the null namespace.
Unfortunately, the Element.setAttributeNS() DOM API makes it possible to
create attributes with a namespace but without a prefix.

This change roughly matches the behavior of Firefox and Internet
Explorer, which is to generate prefixes for elements that need them, at
serialization time. "Roughly" means that we differ in terms of the
ordering of the extra xmlns attributes.

The change fixes another (unreported) xmlns-related bug, namely we emit
two identical xmlns attributes when serializing elements constructed
using a certain sequence of setAttributeNS() calls. This works correctly
on Firefox and Internet Explorer.

BUG=248044

Review URL: https://codereview.chromium.org/114273005

git-svn-id: svn://svn.chromium.org/blink/trunk@171235 bbb929c8-8fbe-4397-9dbb-9b2b20218538