DataFrame or Series.replace(dict) for same type to type replacement produces undesired results
#### Code Sample

```python
import pandas as pd

# a base data series to work on
base_sr = pd.Series((c for c in 'ABCDEFG'))
# the replacement rules: from -> to
repl_d = {'A': 'C',
          'B': 'C',
          'C': 'D',
          'D': 'F',
          'E': 'D',
          'F': 'C',
          'G': 'C', }

# what it does, but should not
base_sr.replace(repl_d)
# what we want
base_sr.apply(repl_d.get)
```
#### Problem description

when a dictionary is used for the replacement ruleset, to replace values in a Series or DataFrame,
the rules of each dictionary entry are applied iteratively on the preceeding entries' outcome.
if the dictionary contains target values that are contained within the following rules, unpredictable behavior is the result.

**Note**: Tried to find issue, but didn't

#### Resulting 1st output (replace)

> 0    C
> 1    C
> 2    C
> 3    C
> 4    D
> 5    C
> 6    C
> dtype: object

#### Expected Output (as with apply above)
(see above code sample)

> 0    C
> 1    C
> 2    D
> 3    F
> 4    D
> 5    C
> 6    C
> dtype: object
> 

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

<details>

INSTALLED VERSIONS
------------------
commit: None
python: 3.6.7.final.0
python-bits: 64
OS: Linux
OS-release: 4.15.0-34-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: de_AT.UTF-8
LOCALE: de_AT.UTF-8

pandas: 0.23.3
pytest: 3.3.2
pip: 9.0.1
setuptools: 39.0.1
Cython: 0.26.1
numpy: 1.13.3
scipy: 0.19.1
pyarrow: None
xarray: None
IPython: 5.5.0
sphinx: 1.6.7
patsy: 0.5.0+dev
dateutil: 2.7.3
pytz: 2018.4
blosc: None
bottleneck: None
tables: 3.4.2
numexpr: 2.6.4
feather: 0.3.1
matplotlib: 2.1.1
openpyxl: 2.4.9
xlrd: 1.1.0
xlwt: None
xlsxwriter: None
lxml: 4.2.1
bs4: 4.6.0
html5lib: 0.999999999
sqlalchemy: 1.1.11
pymysql: None
psycopg2: 2.7.4 (dt dec pq3 ext lo64)
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
</details>
