TimeGrouper with interval gives inconsistent group for different frequencies 

[groupby.zip](https://github.com/pandas-dev/pandas/files/1176532/groupby.zip)


[versions.txt](https://github.com/pandas-dev/pandas/files/1175821/versions.txt)


I am grouping by TimeGrouper frequency as 3months (3m), I am getting the group as the end date..
ie 
**data->2016-05-01
group->2016-05-31 00:00:00**
the group is 31-05-2016 even when my data points are starting from 1-05-2016.
But when I am setting the frequency as 30seconds (3s), I am getting the group as timestamp that does not even exist in the dataframe
ie.
**data-> 2017-02-07 23:58:35.000 to ........
 group->2017-02-07 23:58:30**
 
I tried setting the convention parameter as start,but that did not help.

**code:**
```
df = df.groupby((pd.TimeGrouper(freq='3m')))
```

this inconsistent result is there only for the 1st group.after that,the subsequent groups are alright.
I am currently using pandas 0.20.3

**code:**
`
import pandas as pd


def get_req_interval_resample(interval):
    intr = ['a', 'm', 'd', 'h', 't', 's', 'ms']
    pos = intr.index((interval[-1]).lower())
    if pos == -1:
        return "d"
    if (interval[-1]).lower() == 'ms':
        return "ms"
    req_interval = intr[pos + 1]
    return req_interval


def main(interval=None):
    testdf = pd.read_csv("git_data_1.csv");
    interval = "3m"
    # testdf=pd.read_csv("git_data.csv");interval="30s"

    if (interval != None):
        testdf.index = testdf['timestamp'].values.astype('datetime64[ms]')
        testdf = testdf[~testdf.index.duplicated(keep='first')]
        req_interval = get_req_interval_resample(interval)
        testdf = testdf.resample(req_interval).asfreq()
        df = testdf
        df = df.groupby((pd.TimeGrouper(freq=interval)))
        for i in df:
            print i


if __name__ == "__main__":
    main()
`


**version:**
```
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.13.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 42 Stepping 7, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None

pandas: 0.20.1
pytest: None
pip: 9.0.1
setuptools: 28.8.0
Cython: None
numpy: 1.12.1
scipy: 0.19.0
xarray: None
IPython: None
sphinx: None
patsy: 0.4.1
dateutil: 2.6.0
pytz: 2017.2
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.0.1
openpyxl: None
xlrd: 1.0.0
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: 2.7.1 (dt dec pq3 ext lo64)
jinja2: None
s3fs: None
pandas_gbq: None
pandas_datareader: None
```

**outputs:**
![untitled](https://user-images.githubusercontent.com/30458247/28614377-43840d08-7213-11e7-89d1-96cfc5737902.png)
![untitled1](https://user-images.githubusercontent.com/30458247/28614376-4380e434-7213-11e7-8cf6-0aac39216b2c.jpg)




