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.
Do you want to reset nrep=1 if val==rep==prev?
I would think you'd remove the " and val != prev" from the if.