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.
This can probably be solved by splitting out a `PandasScalarObject` class from `PandasObject`. It may add no functionality to `PandasObject` mixin, but one could inherit from it to underline that it is a scalar and should be treated accordingly.