Cleanup cimports, implement bits of numpy_helper in util.pxd
Removes a few unnecessary uses of `cnp.import_array()`

Uses cython's conditional compilation to avoid runtime PY2/PY3 checks

Arranges cython imports in stdlib-->3rd party--> internal order.

Separates out the one part of `libresolution._FrequencyInferer` that we actually _do_ want to keep in cython

Couple of small lintings in groupby.pyx