ReactiveCocoa/ReactiveCocoa — pull request #317 by jspahrsummers (2013-02-07 21:56:31+00:00)
Title: Refactor +zip: and +combineLatest: to depend on new primitives which take 2 at a time

I realized in the eleventh hour that `+[RACStream zip:reduce:]` isn't a great primitive for new stream classes to have to implement, because implementing a zip over N streams is pretty damn complex (as can be seen from the current implementations).

Rather than freeze that into the API, I added `-zipWith:`, which only operates on two streams at a time, and made it the primitive. The N stream variants have been refactored to depend on it, and I think the result is easier to understand overall.

`+combineLatest:` doesn't really have the same issue with API freezing, but I updated it too, just for parity.

**Other public API changes:**

- Added `-[RACTuple tupleByAddingObject:]`.
- Added `-[RACStream reduceEach:]` as a generic way to invoke the `reduceBlock` functionality. The new implementations of `+zip:reduce:` and `+combineLatest:reduce:` just build on this method.
- The `reduceBlock` of `+zip:reduce:` and `+combineLatest:reduce:` is no longer allowed to be `nil`, since those are no longer the primitive methods. This results in an assertion for Debug builds, but it'll still work in Release (for compatibility).