groupby and resample methods do not preserve subclassed data structures
#### Code sample

```python
class MyDataFrame(pd.DataFrame):
    @property
    def _constructor(self):
        return MyDataFrame

dates = pd.date_range('2019', freq='H', periods=1000)
my_df = MyDataFrame(np.arange(len(dates)), index=dates)

print(type(my_df)) 
# __main__.MyDataFrame (✓)

print(type(my_df.diff())) 
# __main__.MyDataFrame (✓)

print(type(my_df.sample(1))) 
# __main__.MyDataFrame (✓)

print(type(my_df.rolling('5H').mean()))
# __main__.MyDataFrame (✓)

print(type(my_df.groupby(my_df.index.dayofweek).mean()))
# pandas.core.frame.DataFrame (✘)

print(type(my_df.resample('D').mean()))
# pandas.core.frame.DataFrame (✘)

```
#### Problem description

Originally posted on [SO](https://stackoverflow.com/questions/57796464/pandas-groupby-resample-etc-for-subclassed-dataframe?noredirect=1#comment102088835_57796464).

The intended behaviour for chain-able methods on subclassed data structures is clearly that the operation returns an instance of the subclass (i.e. `MyDataFrame`), rather than the native type (i.e. `DataFrame`). This is the current behaviour for most operations (e.g., slicing, sampling, sorting) but not resample and groupby.

Currently groupby and resample both return explicitly constructed pandas datatypes, e.g. here:

https://github.com/pandas-dev/pandas/blob/ac693331400bce4747c63aa76c53c6e3488933ae/pandas/core/groupby/generic.py#L338

To get the expected behaviour, the intermediary classes (e.g. DataFrameGroupBy) would need to retain information about the calling class so that the appropriate constructor can be used (i.e. one of `_constructor` or `_constructor_sliced`  or `_constructor_expanddim`).

Note that operations that use Window and Rolling already appear have the expected behaviour because these assemble their results via a call to `concat` such as this one:

https://github.com/pandas-dev/pandas/blob/171c71611886aab8549a8620c5b0071a129ad685/pandas/core/window.py#L325

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

<details>
INSTALLED VERSIONS
------------------
commit           : None
python           : 3.7.4.final.0
python-bits      : 64
OS               : Windows
OS-release       : 10
machine          : AMD64
processor        : Intel64 Family 6 Model 142 Stepping 9, GenuineIntel
byteorder        : little
LC_ALL           : None
LANG             : None
LOCALE           : None.None

pandas           : 0.25.1
numpy            : 1.17.1
pytz             : 2019.2
dateutil         : 2.8.0
pip              : 19.2.3
setuptools       : 40.8.0
Cython           : None
pytest           : None
hypothesis       : None
sphinx           : None
blosc            : None
feather          : None
xlsxwriter       : None
lxml.etree       : None
html5lib         : None
pymysql          : None
psycopg2         : None
jinja2           : 2.10.1
IPython          : 7.8.0
pandas_datareader: None
bs4              : None
bottleneck       : None
fastparquet      : None
gcsfs            : None
lxml.etree       : None
matplotlib       : 3.1.1
numexpr          : 2.7.0
odfpy            : None
openpyxl         : None
pandas_gbq       : None
pyarrow          : None
pytables         : None
s3fs             : None
scipy            : 1.3.1
sqlalchemy       : None
tables           : 3.5.2
xarray           : None
xlrd             : None
xlwt             : None
xlsxwriter       : None

</details>
