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.
patsy (and statsmodels) do not unconditionally import pandas, so this would need 2 additionally checks (has_pandas, the version check, and then still if it is a data with dtype and if that dtype is categorical...