converted WordGrammarDebugger to use XmlWriter

Change-Id: I808087d3df701099b445e833bcdd99c62a19f412