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.
