Fix: Add compat code for pd.Categorical in pandas>=0.15

pandas renamed pd.Categorical.labels to pd.Categorical.codes. It's
also now possible to have Categoricals as blocks, so Series can contain
Categoricals.
I think the only alternative is 
```
try:
    return data.codes
except:
    return data.labels
```
[Thats the variant which is not in statsmodels]

But I like explicit checks and not the try-except variants.