lib/win_minmax: windowed min or max estimator