API: add a more generic type checking function
I propose a more generic type checking function for pandas, based on subclass checking of dtype.types.

Quite often (most of the time?) when checking dtypes, you simply want to check if a dtype's type is a subclass of some base numpy/pandas type, but today you can't take such a subclass approach.

Most type checking is possible today using functions in ``pd.api.types`` using various functions, but I propose a single, more generic ``is_dtype_subclass`` function (name mirrors ``is_dtype_equal``), that checks if a ``Series.dtype.type``, a ``dtype.type`` a numpy/pandas type etc.  is a subclass of another.

I find this approach very pythonic and practically useful. The downside is that it will have overlaps with other type checking functions, but as this function allows making very specific type subclass checks, I feel it would add value to pandas. Should I proceed with this (write tests, docs etc) or do you feel that this function wouldn't add value?

See code example below.

```python
    import numpy as np
    import pandas as pd

    def is_dtype_subclass(source, target):
        """
        Check if a dtype.type is a subclass of another dtype.type.
        
        For any given args, the relevant dtype.type will be found,
        so you can give this function different numpy/pandas objects to compare,
        e.g. compare a Series to a numpy type. Strings will be coerced into the relevant types
        per the usual rules of pandas/numpy.

        Parameters
        ----------
        source : The first object to compare
        target : The second object to compare

        Returns
        ----------
        boolean : Whether or not ``source`` dtype.type is a subclass of ``target`` dtype.type.

        Examples
        --------
        >>> import pandas as pd, numpy as np
        >>> is_dtype_subclass(pd.Series([1, 2, 3]), np.integer)
        True
        >>> is_dtype_subclass(np.dtype('float32'), np.number)
        True
        >>> is_dtype_subclass('int64', np.integer)
        True
        >>> is_dtype_subclass('int64', 'int32')
        False
        >>> is_dtype_subclass(int, float)
        False
        >>> is_dtype_subclass(object, "category")
        False
        >>> is_dtype_subclass(pd.Categorical([]), "category")
        True
        >>> is_dtype_subclass(np.datetime64, "datetime64")
        True
        >>> is_dtype_subclass(pd.date_range(start='2017-06-23', periods=5), 'datetime64[ns]')
        True
        """

        def get_type(arg):
            """Get the dtype.type of ``arg``.
            """
            if isinstance(arg, pd.DataFrame):
                raise ValueError("Arg is a dataframe."
                                 " Check each column individually")
            elif isinstance(arg, (pd.Series, pd.Index,
                                  pd.Categorical, pd.Interval,
                                  pd.DatetimeIndex)):
                return arg.dtype.type
            elif isinstance(arg, np.dtype):
                return arg.type
            elif np.issubclass_(arg, np.generic):
                return arg
            dt = pd.core.dtypes.dtypes
            dtypes = (dt.CategoricalDtype, dt.DatetimeTZDtype,
                      dt.IntervalDtype, dt.PeriodDtype)
            for dtype in dtypes:
                if arg in (dtype, dtype.name, dtype.str, dtype.type):
                    return dtype.type
            return np.dtype(arg).type

        return issubclass(get_type(source), get_type(target))
```
