[XLA:GPU/CPU] Enable tree reduction rewriter for reduce-window on GPU and CPU
[XLA:GPU/CPU] Enable tree reduction rewriter for reduce-window on GPU and CPU

>10x difference in performance when compiling tf.cumsum

For a tf.cumsum over 1e6 elements on A6000 GPU:

Without this patch: ~466ms
With the patch: 40us

This is faster than TF native implementation.

The value of splitting is chosen heuristically.
