Performance improvements for nunique method.

tests fail with that change:

    raise NotImplementedError("isnull is not defined for MultiIndex")