Add write support for dact & compact corpora.
Fix writertype argument, return values, docstrings

- fix handling of writertype argument
- write() and write_entries() return number of entries written
- add docstrings
catch exceptions, deallocate, release GIL in write_entries()

Note: when writing a single entry with write(), the GIL is not released
because:

- releasing the GIL has overhead
- entries typically need to be written in a specific order so
  single-threaded use makes sense for write().
size_t != Py_ssize_t
Merge pull request #4 from andreasvc/master

Add write support for dact & compact corpora.