Fix Take Early Unsubscription Causing Interrupts

Fixes https://github.com/ReactiveX/RxJava/issues/1804
Fix Thread Safety for Unsubscribe

I'm using a separate variable so the volatile is only touching during window start/end and unsubscribe rather than every onNext.
Merge pull request #1833 from benjchristensen/window-tweaks

Fix Thread Safety for Unsubscribe of Window
Subject.toSerialized

Adds toSerialized as discussed in https://github.com/ReactiveX/RxJava/issues/1748
Scan/Reduce with Seed Factory

Adds overload with seed factory as per https://github.com/ReactiveX/RxJava/issues/1831
RxRingBufferSize (128 default, 16 on Android)

- changing from 1024 to 128 based on perf tests
- platform dependent check for Android to set to 16 to reduce memory usage
IndexedRingBufferSize (256 default, 8 on Android)

- changing from 512 to 256 based on perf tests
- platform dependent check for Android to set to 8 to reduce memory usage (use cases on Android should rarely if ever hit the use case with merge that requires the higher buffer sizes for performance)
Merge pull request #1836 from benjchristensen/ring-buffer-size

Reduce Ring Buffer Default Sizes (and lower for Android)
Merge pull request #1835 from benjchristensen/reduce-scan-mutable-seed

Scan/Reduce with Seed Factory
Merge pull request #1832 from benjchristensen/thread-interrupts-take

Fix Take Early Unsubscription Causing Interrupts
Merge pull request #1834 from benjchristensen/toSerializedSubject

Subject.toSerialized