Refactor _postcohtable.c
When cherrypicking/reviewing !25 (merged) I wrongly assusmed that much of the file was boilerplate. It has large changes, repeated & fomulaic code, involves python/c interop, and is quite technical. Turns out it's written by hand, and contained a bug that caused #13 (closed).
Most of it is ok, but it could do with some variable renamings, and some of the repeated code can be extracted to separate functions.
(I'll push a branch with some specific changes for discussion)