BUG: astype("category") creates unreachable objects and memory leak
#### Code Sample, a copy-pastable example if possible

```python
>>> import gc
>>> import pandas as pd
>>> import numpy as np
>>> from time import sleep
>>> x = pd.Series(np.arange(10**6) % 10**3).astype(str)
>>> for _ in range(10):                                                                                                                                                                 
...     c = x.astype('category')
...     print("unreachabe obj by gc = " + str(gc.collect()))
... 
unreachabe obj by gc = 0
unreachabe obj by gc = 7
unreachabe obj by gc = 7
unreachabe obj by gc = 7
unreachabe obj by gc = 7
unreachabe obj by gc = 7
unreachabe obj by gc = 7
unreachabe obj by gc = 7
unreachabe obj by gc = 7
unreachabe obj by gc = 7

```
#### Problem description

It seems like the process of converting object columns to category columns leaks some memory.

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

<details>

INSTALLED VERSIONS
------------------
commit: None
python: 3.6.6.final.0
python-bits: 64
OS: FreeBSD
OS-release: 10.4-RELEASE-p10
machine: amd64
processor: amd64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8

pandas: 0.23.3
pytest: None
pip: 18.0
setuptools: 40.0.0
Cython: 0.28.4
numpy: 1.15.0
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: None
sphinx: 1.7.6
patsy: 0.5.0
dateutil: 2.7.3
pytz: 2018.5
blosc: None
bottleneck: None
tables: None
numexpr: 2.6.6
feather: None
matplotlib: 2.2.2
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: 1.2.10
pymysql: None
psycopg2: 2.7.5 (dt dec pq3 ext lo64)
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: 0.5.0
pandas_datareader: None
</details>
