Categorical fixups

Some fixups for Categoricals.

Fixes: #3678
`cat.levels` returns a `Index`, but `cat.codes` returns a (readonly) `numpy.array`. `codes : index` implies certain methods, which are not present!? 

So I think this is correct now...