title: Time-based .rolling() fails with group by
body: <p>Here's a code snippet from <a href="https://github.com/pandas-dev/pandas/issues/13966" rel="noreferrer">Pandas Issue #13966</a></p>
  
  <pre><code>dates = pd.date_range(start='2016-01-01 09:30:00', periods=20, freq='s')
  df = pd.DataFrame({'A': [1] * 20 + [2] * 12 + [3] * 8,
                     'B': np.concatenate((dates, dates)),
                     'C': np.arange(40)})
  </code></pre>
  
  <p>Fails:</p>
  
  <pre><code>df.groupby('A').rolling('4s', on='B').C.mean()
  ValueError: B must be monotonic
  </code></pre>
  
  <p>Per the issue linked above, this seems to be a bug. Does anyone have a good workaround?</p>