BUG: Series.astype does not change categorical dtype if categories match up to permutation
#### Code Sample, a copy-pastable example if possible

```python
pd.Series(['A', 'B'], dtype='category').astype(pd.CategoricalDtype(categories=['B', 'A'])).cat.categories
```

#### Problem description

This should return `Index(['B', 'A'])` but actually it returns `Index(['A', 'B'])`. This is bad because if I use `astype` to give a Series a particular dtype I expect the result to have the dtype I asked for!

Both of these examples work as expected, so this bug only seems to happen if the new dtype has categories that are equal to the old categories after sorting:
```python
pd.Series(['A', 'B'], dtype='category').astype(pd.CategoricalDtype(categories=['A'])).cat.categories
pd.Series(['A', 'B'], dtype='category').astype(pd.CategoricalDtype(categories=['B', 'A', 'C'])).cat.categories
```

#### Expected Output

`Index(['B', 'A'])`

#### Output of ``pd.show_versions()``

<details>
INSTALLED VERSIONS
------------------
commit           : None
python           : 3.8.0.final.0
python-bits      : 64
OS               : Windows
OS-release       : 10
machine          : AMD64
processor        : Intel64 Family 6 Model 63 Stepping 2, GenuineIntel
byteorder        : little
LC_ALL           : None
LANG             : None
LOCALE           : English_United Kingdom.1252

pandas           : 0.25.3
numpy            : 1.17.4
pytz             : 2019.3
dateutil         : 2.8.1
pip              : 19.3.1
setuptools       : 42.0.2.post20191203
Cython           : None
pytest           : None
hypothesis       : None
sphinx           : None
blosc            : None
feather          : None
xlsxwriter       : None
lxml.etree       : None
html5lib         : None
pymysql          : None
psycopg2         : None
jinja2           : None
IPython          : None
pandas_datareader: None
bs4              : None
bottleneck       : None
fastparquet      : None
gcsfs            : None
lxml.etree       : None
matplotlib       : None
numexpr          : None
odfpy            : None
openpyxl         : None
pandas_gbq       : None
pyarrow          : None
pytables         : None
s3fs             : None
scipy            : None
sqlalchemy       : None
tables           : None
xarray           : None
xlrd             : None
xlwt             : None
xlsxwriter       : None
</details>
