Test doctests in pandas/core/tools/datetimes.py
#### Code Sample, a copy-pastable example if possible

Doctests in `to_datetime()`.

#### Problem description

It is being failed as below:

```
Failed example:
    df = pd.DataFrame({'year': [2015, 2016],
Exception raised:
    Traceback (most recent call last):
      File "/Applications/PyCharm.app/Contents/helpers/pycharm/docrunner.py", line 140, in __run
        compileflags, 1), test.globs)
      File "<doctest to_datetime[0]>", line 1
        df = pd.DataFrame({'year': [2015, 2016],
                                               ^
    SyntaxError: unexpected EOF while parsing
```

```
Failed example:
    pd.to_datetime([1, 2, 3], unit='D',
                   origin=pd.Timestamp('1960-01-01'))
Expected:
    0    1960-01-02
    1    1960-01-03
    2    1960-01-04
Got:
    DatetimeIndex(['1960-01-02', '1960-01-03', '1960-01-04'], dtype='datetime64[ns]', freq=None)
```

```
Failed example:
    %timeit pd.to_datetime(s,infer_datetime_format=False)
Exception raised:
    Traceback (most recent call last):
      File "/Applications/PyCharm.app/Contents/helpers/pycharm/docrunner.py", line 140, in __run
        compileflags, 1), test.globs)
      File "<doctest to_datetime[7]>", line 1
        %timeit pd.to_datetime(s,infer_datetime_format=False)
        ^
    SyntaxError: invalid syntax
```

#### Expected Output

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

<details>

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

pandas: 0.24.2
pytest: 4.4.1
pip: 19.0.3
setuptools: 40.8.0
Cython: None
numpy: 1.16.2
scipy: None
pyarrow: 0.13.0
xarray: None
IPython: None
sphinx: 2.0.1
patsy: None
dateutil: 2.8.0
pytz: 2019.1
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10.1
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None

</details>
