COMPAT: unique() should preserve the dtype of the input
The behavior of `pd.unique()` is surprising, because -- unlike `np.unique()` -- the result does not have the same `dtype` as the input:

```python
In [1]: pd.Series([1,2,3], dtype=np.uint8).unique()
Out[1]: array([1, 2, 3], dtype=uint64)
```

This PR just casts the output array to match the input dtype.  Supercedes #27869.

**Update:** Augmented the tests to cover narrow dtypes.

~I added a new assertion in `test_value_counts_unique_nunique()`, but it may not be sufficient.  From what I can see, there isn't good coverage of `Series` whose *data* is not `int`/`float`/ etc.  There is only good coverage of various *index* types. Any advice concerning test coverage?~

- [x] closes #27869
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
