Preserve non-self-closing tags in output.

Use node.isSelfClosing to preserve empty, non-self closing tags.
Clean up error handling to return the error in the first position per
convention.
Add setText function to Element.
Expose ENTITIES for modification.

Allows the user to specify more entities, like nbsp.