Add write support for dact & compact corpora.

I want to run XPath queries on dact corpora converted from different treebank formats, and writing dact corpora from Python is the last step for that. Let me know if there's anything that needs improving.