Add support for Apache's <dom> type.

Also, fix typos in other Apache types concerning the use of namespaces.

See also #6.
Rewrite encoder/decoder unit tests entirely.

The new code is cleaner, easier to read and a lot easier to maintain.
Also, add tests for Apache's types.