ENH: replace uses of np.isscalar with pd.lib.isscalar
`np.isscalar` doesn't detect a lot of types that are scalar from pandas point of view, such as dates, times, `None`, `pd.Period`, so `pd.lib.isscalar` should be preferred instead.

Adding the issue as requested in #8706.
