BUG: Bug in quantile() and median() returned wrong result for non monotonic window borders
- [x] closes #37153
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

cc @mroeschke 

Values were not added to the window again if starting point was moved back and values were not removed from the window, when ending point was moved back

Should I create functions for the deletion and addition?
Yeah would be great to create a function that median and quantile could share for the skiplist inserts and removal Should we move the for the ``for j in range(s, e):`` blocks into the function too? Would be differing from the other parts, but otherwise the assignment of ``err`` is a bit long winded Hmm if it makes the code more DRY then sure. this is orthogonal to #36933 ? > this is orthogonal to #36933 ?

Yes, median and quantile are slightly different from sum/mean/var We can use ``is_monotonic_start_end_bounds`` here too nevertheless. Did miss that previously. I would rename the function after #36933 is merged. Mind merging in master? https://github.com/pandas-dev/pandas/pull/36933 was recently pulled in (but shouldn't directly interfere)  Thanks for the heads up. Had to rename the method, but this was expected. I think this could be merged now. Appears that there's another merge conflict.  Thanks @phofl 