ENH: Extending Pandas with custom types
Adds an interface for 3rd party libraries to define custom array types. When
pandas encounters these objects, we'll resist the temptation to cast them to
`object` dtype.

This isn't near being ready yet, but I wanted to make a PR to get some thoughts
on the general approach / scope. I wouldn't recommend reviewing the code in
detail yet.


Some questions:

1. Do we want to do this?

   The big concern being the pandas2 transition. I've tried to hide all
   block-related changes in an adapter class. I don't think that allowing
   extension types will hinder the transition in a major way.

2. Should our current extension types implement the interface?

   Categorical essentially satisfies it already.

   Interval basically does, but there isn't an ``IntervalArray`` class really,
   just an ``IntervalIndex``.

   Period is the same as Interval.

   SparseArray is a bit weird since it's an actual subclass of ``ndarray``.
   Needs some more thought.

   datetime-with-tz is also weird (ndarray, just with a custom type).

3. What to do with indexes?

   Having an ``ExtensionIndex`` will be useful I think (value_counts, groupby,
   etc.). But I haven't tackled it yet. Haven't really thought about indexing at
   all, since it sounds hard.

4. How much of the ndarray implementation should we push onto the pandas array
   interface?

Probably some others, but that should kick things off. For those interested in
following along, I'm using this over in
https://github.com/continuumio/pandas-ip. It's nice to have a concrete problem
to solve.

Closes https://github.com/pandas-dev/pandas/issues/18767