WIP: Experimental changes in `rolling_var` related to #7900

Added logic to `rolling_var` to detect windows where all non-NaN
values are identical.

Need to assess both correctness and performance impact.
Correction: In my suggestion, you'd need to handle the removal of prev before the addition of val, in order to properly handle the case that everything after prev is constant. Either way, I think this would be straightforward to do in a single loop.

Only downside I see is that when both prev and val are non-null, under my suggestion you would be dealing with them separately, which may not be quite as numerically accurate as dealing with them simultaneously (e.g. ``delta = val - prev``). But I doubt that is meaningful.