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.

hmm
what about nan/NaT ? 
 pls also create an issue to change use of np.isscalar to use lib.isscalar
 > what about nan/NaT? 

nan is good as long as it's some sort of float.
NaT is good as long as it's an instance of `datetime.date`:

``` python
In [4]: type(pd.NaT).mro()
Out[4]: 
[pandas.tslib.NaTType,
 pandas.tslib._NaT,
 pandas.tslib._Timestamp,
 datetime.datetime,
 datetime.date,
 object]
```

But OK, I'll add the tests 
 I'm also not sure about the name of `unbox_if_zerodim`, it may create an impression that it's related to timestamp boxing/unboxing, but I couldn't come up with a better yet concise name.
 how about `_maybe_to_scalar` ?
 > how about _maybe_to_scalar ?

It kind of loses the zerodim part and, besides, array may contain a non-scalar, e.g. `np.array({}).item() == {}`. Maybe `item_if_zerodim`?
 Or, given there's a `values_from_object`, `item_from_zerodim`?
 `item_from_zerodim` sounds good (maybe doc better that I did `values_from_object`  :)
 merged via https://github.com/pydata/pandas/commit/02de8530419e253eb51ca8ec17e195deb455cd75

I changed it very slightly to make the period checking more consistent with internals. (and IIRC need this somewhere else anyhow).

thanks!

these subtle changes are excellent! all towards better code!
