upcoming release will be 5.0.0
upcoming release will be 5.0.0

Summary:
Starting this stack by bumping the next release version, because we're about to make breaking changes (plus there's already breaking changes since the last release)

# Project overview

## Stability improvements

* `[IGListAdapter setDataSource]` isn't safe
  * We're changing the underlying data without telling the `UICollectionView`.
  * Fix: Lets invalidate the `UICollectionView` data by changing its dataSource. More details in the diffs.
* `[IGListAdapter setCollectionView]` isn't safe
  * This is synchronous, but we might have pending or on-going updates. The `UICollectionView` might get synced before the pending update actually start executing, so the diff results will be off.
  * Fix: Lets wrap updates in a transaction that can be cancelled.
* Returning a nil `IGListSectionController` from `IGListAdapterDataSource` could crash
  * The `IGListAdapterUpdater` will still perform the diffing assuming that all the objects will have a section, which isn't the case.
  * Fix: Lets generate the `IGListSectionController` before the diffing.
* Multiple item update blocks can conflict and crash
  * Because section-controllers can directly insert/delete/move `NSIndexPath`, we can run into conflicts when merging multiple batch updates together.
  * Fix: Working on automatic conflict resolution.
* Item reloads aren't safe
  * Lets say you have a section with items ["a", "b"] and need to update to items ["b-reloaded"]. You reload "b" (index 1) and delete "a" (index 0) in the same batch update block (or in separate blocks within the same overall update). This gets converted into 3 changes: delete 0, insert 1, delete 1 ... but we only have 1 item, so index 1 doesn't make sense anymore! This is because we convert reloads to insert/deletes without taking into account that inserts are relative the list after the update.
  * Fix: Same as above, we need to convert the index to match the list after the update.
* Other
  * Lets ask for the `fromObject` just before diffing, instead of asking when scheduling the update.
  * If the `UICollectionView` section count doesn't match `fromObject`, lets fallback to a reload.

## Performance improvements

* Re-test background diffing
  * `IGListExperimentBackgroundDiffing` and coalescing updates wasn't safe because of the issues mentioned above. The longer we wait, the more likely we'll end up in a race condition. Lets try re-testing with the stability improvements.
* Less array resizing and set hashing
  * We can skip some hashing by using an `NSArray` instead of a `NSSet` in `updateObjects`. The adapter or updater should have dealt with uniqueness already.
* Avoid calling `[UICollectionView performBatchUpdate ...]`
  * If there's no update, lets try skipping `performBatchUpdate`.
* Background work
  * This is a larger project that will need to be borken out, but these improvements are required to make background work safe.
* Avoid double cell creation
  * Still investigating why this is happening

## Other

* Transactions
  * `IGListAdapterUpdater` is the workhorse of `IGListKit` and has become a bit hard to follow over the years. We want to break it apart into simpler, more manageable parts.
* Avoid blocks
  * There's a lot of blocks flying around, making crash logs hard to read. Lets try to use methods/functions where possible.

Reviewed By: patters

Differential Revision: D23429237

fbshipit-source-id: ac200f139df05fefea2a83e1b942d58638ff9e15

Instagram/IGListKit,Instagram/IGListKit,Instagram/IGListKit,Instagram/IGListKit,Instagram/IGListKit