REF: de-duplicate code in liboffsets
```
In [2]: dti = pd.date_range("2016-01-01", periods=10000, freq="S")              
In [3]: off = pd.offsets.BMonthEnd(2)                                           
In [4]: %timeit dti + off                                                       
3.36 ms ± 14 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)  # <-- master
998 µs ± 12.5 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)  # <-- PR
```