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.
I realized that I didn't fix ``Period`` like I did ``Categorical``, see here:https://github.com/pydata/pandas/blob/master/pandas/core/common.py#L85

if you add ``_typ`` to ``Period`` then you can create ``ABCPeriod`` and then import it in cython and do a direct isinstance check, no need for ``PandasScalarObject`` (though you could create that as a congolomerate type as ``ABCScalar`` if you want ('categorical','period','timedelta','timestamp')) I think would work.