API: add return_inverse to pd.unique
- [x] splits off first chunk of #24108; progress towards #4087 / #21357 / #21720 / #22824
- [x] tests expanded / parametrized / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

This is the first part I'm splitting off of #24108, but now with full test coverage. For the moment, I've added `return_inverse` to `pd.unique` and to `Categorical.unique`, but it's not trivial because of inconsistencies like the following:
```
>>> import pandas as pd
>>> idx = pd.Index([0, 1, 1, 0])
>>> pd.unique(idx)
array([0, 1], dtype=int64)
>>>
>>> # So pd.unique(Index) yields an array, except if the Index is categorical...?
>>> idx = idx.astype('category')
>>> pd.unique(idx)
CategoricalIndex([0, 1], categories=[0, 1], ordered=False, dtype='category')
```

I'd be open to further split off the change for `Categorical.unique`, or just return `NotImplemented` for all `ExtensionArray` types. As mentioned in #24108 already, I believe that the possibility for `return_inverse` (or maybe even kwargs in general??) is something that should be added to the EA interface. @TomAugspurger @jreback @jbrockmendel 

