Fix develop

- [Forked XMLWriter](https://github.com/dimagi/XMLWriter) and applied escaping fixes ([PR](https://github.com/alexandern/XMLWriter/pull/6) submitted upstream). This should resolve http://manage.dimagi.com/default.asp?110081. See also https://github.com/dimagi/Vellum/pull/210#issuecomment-41284774
- Use `writeXML` instead of `writeString` in places where XML characters should not be escaped.
- Minor code cleanup.