Set namespaces of attributes correctly

Also added tests for them.

I'm not sure what happens to prefixed elements, but that's all the info I could find in the parser output format for now.
I think we would get the same coverage from `var doc = jsdom.jsdom(fs.readFileSync(...))`; jsdom.env seems not that useful here.