clean up some unnecessary C-API usages and integer sizes

note: integer size fixes which require corresponding changes in itertoolz.pxd