Index dtype is changed to object after left join
#### Code Sample

```python
import pandas as pd
import numpy as np

left = pd.DataFrame(
    columns=['A'], 
    index=pd.Index([], name='id', dtype=np.int64)
)
right = pd.DataFrame(
    [[5]], 
    columns=['B'],
    index=pd.Index([42], name='id', dtype=np.int64)
)
res_idx_dtype =  left.join(right).index.dtype
assert res_idx_dtype == np.int64
```
#### Problem description

When executing a left join on two dataframes I would expect the resulting index type to be of the same type my left dataframe was.

I ran into this issue while using dask. I executed another join on the resulting dataframe which resulted in an error, because the index was of type object instead of np.int64.

#### Expected Output

```
>>>  left.join(right).index.dtype
dtype('int64')
```

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

<details>

INSTALLED VERSIONS
------------------
commit: None
python: 3.6.5.final.0
python-bits: 64
OS: Darwin
OS-release: 17.7.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8

pandas: 0.23.3
pytest: None
pip: 9.0.3
setuptools: 40.4.3
Cython: 0.29.10
numpy: 1.14.3
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 7.0.1
sphinx: None
patsy: None
dateutil: 2.7.5
pytz: 2018.5
blosc: None
bottleneck: None
tables: 3.5.2
numexpr: 2.6.9
feather: None
matplotlib: 2.2.2
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: 1.2.9
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: 0.2.1
fastparquet: 0.3.1
pandas_gbq: None
pandas_datareader: None

</details>
