refactor _postcohtable.c
There was a lot of unnecessary code repeition, concerning memory management, and a couple of other questionable choices in _postcohtable.c
I've extract most repeated code to function calls. Names are generally more meaningful and less terse. I took a couple of the changes/renames from ldavis/add_kagra, hopefully that will simplify any merge.
There's generally better error checks and unterminated string handling.
Resolves #14 (closed)