BUG: fixes pd.Grouper for non-datetimelike groupings #8866
closes #8866 

The bug was caused by a couple of things, firstly when specifying only a level, the axis default was None. This meant it failed to create the internal grouper breaking on line 254 of groupby.py: 

``` python
ax = obj._get_axis(self.axis)
```

Secondly, the aggregate function is set up to take a basegrouper class whereas for datetime resampling we need to pass a datetime index. I split the `_set_grouper` method to return a datetime index when a resampling frequency is specified and a `BaseGrouper` class otherwise. I opted to split that out into two functions to reduce complexity with much of the `_set_basegrouper` function being borrowed from the `_get_grouper` function. Let me know if there's a better way to fix this.

this needs a test. This should be a much simpler change.
 I thought it was going to be simpler, maybe I've missed something but I couldn't get around that I needed to pass a basegrouper to aggregate and a datetime index to resample. 
 no, this just needs a small change in `TimeGrouper` to handle the `level` arg. 

when `pd.Grouper(freq='....'....)` happens, it is immeditately returned as a `TimeGrouper`. (see `__new__`). Its not the best design, but `TimeGrouper` is a valid class.
 Ah I see, I presumed TimeGrouper should only be used for datetimes, (was that originally the case?). So anything that gets passed into groupby as a grouper will be handled by the `TimeGrouper` then. I guess that simplifies things, I'll look into making that change instead.
 I've had a look again and it's easy enough to return a `TimeGrouper` when level is specified, however the problem is that the groupby calls the `TimeGrouper._get_grouper` function which returns a `BinGrouper`. I'm not sure it makes sense to convert a non-datetime index to a `BinGrouper` does it? Only  `BinGrouper` and `BaseGrouper` are currently valid groupers for aggregating.
 no this should be virtually identical to setting the index then resampling (in fact that can be w test)
 how can we resample on a non-datetime index?
 I mean groupby.
 turns out this was a trivial issue, see #9008 

thanks for the effort
