Updates to XMLWriter class.

- Added javadocs and update some methods to support chaining
- Removing emptyElement() in factor of element() with null value for text
- Removed static create and made constructor public