BUG: fix reverse comparison operations for Categorical

This PR fixes #8658 and also adds `pd.lib.unbox_if_zerodim` that extracts values from zerodim arrays and adds detection of `pd.Period`, `datetime.date` and `datetime.time` in pd.lib.isscalar.

I tried making `unbox_if_zerodim` usage more implicit but there's just too much to test when this is introduced (think every method that accepts a scalar must have another test to check it also accepts zerodim array).  Definitely too much to add for a single PR, but overall zerodim support could be added later on class-by-class basis.
```python
In [11]:  getattr(pd.Period('2014-01-01') ,'_typ', 'i dont have a _typ')
Out[11]: 'i dont have a _typ'
```

PeriodIndex has `_typ = 'periodindex'`, but I'm not sure what does it suppose to mean.