Weird performance characteristics of resampled quantile() function (100 times slower)
#### Code Sample, a copy-pastable example if possible

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

print("Pandas version:", pd.__version__)
print("Numpy version:", np.__version__)

index = pd.date_range("2016-01-01", periods=int(1e7), freq="ms")
df = pd.DataFrame(np.random.rand(len(index)), columns=["column"], index=index)

print()
print("Median")

start = time()
df.resample("1min").median()
print("df.resample.median", time() - start)

start = time()
df.column.resample("1min").median()
print("df.column.resample.median", time() - start)

start = time()
df.resample("1min").column.median()
print("df.resample.column.median", time() - start)

start = time()
df.resample("1min").apply(lambda x: np.median(x))
print("df.resample.apply np.median", time() - start)

start = time()
df.column.resample("1min").apply(lambda x: np.median(x))
print("df.column.resample.apply np.median", time() - start)

start = time()
df.column.resample("1min").apply(lambda x: x.median())
print("df.column.resample.apply pd.median", time() - start)

start = time()
df.resample("1min").column.apply(lambda x: np.median(x))
print("df.resample.column.apply np.median", time() - start)

start = time()
df.resample("1min").column.apply(lambda x: x.median())
print("df.resample.column.apply pd.median", time() - start)

print()
print("Quantile")

start = time()
df.resample("1min").quantile(0.25)
print("df.resample.quantile", time() - start)

start = time()
df.column.resample("1min").quantile(0.25)
print("df.column.resample.quantile", time() - start)

start = time()
df.resample("1min").column.quantile(0.25)
print("df.resample.column.quantile", time() - start)

start = time()
df.resample("1min").apply(lambda x: np.quantile(x, 0.25))
print("df.resample.apply np.quantile", time() - start)

start = time()
df.resample("1min").apply(lambda x: x.quantile(0.25))
print("df.resample.apply pd.quantile", time() - start)

start = time()
df.column.resample("1min").apply(lambda x: np.quantile(x, 0.25))
print("df.column.resample.apply np.quantile", time() - start)

start = time()
df.resample("1min").column.apply(lambda x: x.quantile(0.25))
print("df.resample.column.apply pd.quantile", time() - start)

```

Output:
```
Pandas version: 0.24.2
Numpy version: 1.16.2

Median
df.resample.median 0.5927023887634277
df.column.resample.median 0.5536832809448242
df.resample.column.median 0.5364699363708496
df.resample.apply np.median 0.1465294361114502
df.column.resample.apply np.median 0.14081549644470215
df.column.resample.apply pd.median 0.19739317893981934
df.resample.column.apply np.median 0.704085111618042
df.resample.column.apply pd.median 0.7553591728210449

Quantile
df.resample.quantile 0.8943967819213867
df.column.resample.quantile 16.76218605041504
df.resample.column.quantile 16.512025117874146
df.resample.apply np.quantile 0.15454792976379395
df.resample.apply pd.quantile 0.2752718925476074
df.column.resample.apply np.quantile 0.1515665054321289
df.resample.column.apply pd.quantile 0.8622317314147949
```


#### Problem description

I have noticed that `quantile()` is sometimes extremely slow even though `median()` (which should have a similar run time) is not. While debugging the behaviour, I have found the following two problems:

1) apply + numpy is significantly faster than the corresponding pandas functions. This is surprising since I would have expected that the pandas operations avoid the overhead of apply().
2) If you perform `quantile()` on a series instead of a dataframe, then the operation is much slower. In the example above, it is 100 times slower than the fastest equivalent.

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

<details>

INSTALLED VERSIONS
------------------
commit: None
python: 3.6.5.final.0
python-bits: 64
OS: Linux
OS-release: 4.4.0-17134-Microsoft
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: C.UTF-8
LOCALE: en_US.UTF-8

pandas: 0.24.2
pytest: None
pip: 19.0.2
setuptools: 40.8.0
Cython: None
numpy: 1.16.2
scipy: 1.2.1
pyarrow: None
xarray: None
IPython: 7.4.0
sphinx: None
patsy: 0.5.1
dateutil: 2.8.0
pytz: 2018.9
blosc: None
bottleneck: None
tables: 3.5.1
numexpr: 2.6.9
feather: None
matplotlib: 3.0.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: 1.3.1
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None

</details>
