Proper namespace support for attributes.

This separates namespace handling into namespace names and namespace objects.
The namespace objects are retrieved from the element an attribute belongs to.
Once retrieved the namespace is cached, due to the overhead of retrieving
namespaces in large documents.
Proper namespace support for elements.

This is still a bit rough on the edges but already way better than the broken
setup I had before.
Updated XPath specs for better namespace handling.