df.groupby().head(n) returns one too many rows, cannot return 1 row.
#### Code Sample, a copy-pastable example if possible

n = 1 returns two rows instead of one.

```python
df = pd.DataFrame([[1, 2], [1, 4], [5, 6]],
                              columns=['A', 'B'])
df.groupby('A').head(1)
```
|   | A | B |
|---|---|---|
| 0 | 1 | 2 |
| 2 | 5 | 6 |

But n=0 returns 0 rows.

```python
df = pd.DataFrame([[1, 2], [1, 4], [5, 6]],
                              columns=['A', 'B'])
df.groupby('A').head(0)
```
|   | A | B |
|---|---|---|

Compare with df.head(n), where n=1 returns 1 row.
```python
df = pd.DataFrame([[1, 2], [1, 4], [5, 6]],
                              columns=['A', 'B'])
df.head(1)
```

|   | A | B |
|---|---|---|
| 0 | 1 | 2 |


#### Problem description

df.groupby('A').head(n) should return the same number of rows as df.head(n), but the groupby version has an off by one error. Furthermore, the groupby version cannot return just 1 row.

#### Expected Output

n = 1 returns 1 row

```python
df = pd.DataFrame([[1, 2], [1, 4], [5, 6]],
                              columns=['A', 'B'])
df.groupby('A').head(1)
```

|   | A | B |
|---|---|---|
| 0 | 1 | 2 |

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

<details>

INSTALLED VERSIONS
------------------
commit: None
python: 3.6.4.final.0
python-bits: 64
OS: Windows
OS-release: 8.1
machine: AMD64
processor: Intel64 Family 6 Model 78 Stepping 3, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None

pandas: 0.23.4
pytest: 3.3.2
pip: 18.0
setuptools: 38.4.0
Cython: 0.27.3
numpy: 1.14.2
scipy: 1.0.0
pyarrow: None
xarray: None
IPython: 6.2.1
sphinx: 1.6.6
patsy: 0.5.0
dateutil: 2.6.1
pytz: 2017.3
blosc: None
bottleneck: 1.2.1
tables: 3.4.2
numexpr: 2.6.4
feather: None
matplotlib: 2.1.2
openpyxl: 2.4.10
xlrd: 1.1.0
xlwt: 1.3.0
xlsxwriter: 1.0.2
lxml: 4.1.1
bs4: 4.6.0
html5lib: 1.0.1
sqlalchemy: 1.2.1
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None

</details>
