BUG: Fix TypeError in _cython_agg_blocks
and change one of the high-level `except Exception`s in groupby.groupby to `except (TypeError, NotImplementedError)`.  The remaining `TypeError` will be addressed in a separate PR.  Haven't decided about the remaining NotImplementedError.

cc @jreback @WillAyd.