Implementation & unit test for enhancement described in issue #74

Uses `DeleteChildren()` to delete document's contents, and code previously in `InitDocument()` to reset the internal state. This was requested in issue #74.