Batch subupdates caused by any state update

With this, multiple setState calls triggered by a componentDidUpdate handler (or similar) will be batched together, regardless of if the original setState call was in a batching context.

I also cleaned up some inconsistencies with the order of component updates and callbacks in situations where one component's update directly causes another to update.

Fixes #1147. Helps with #1353 and #1245 as well, though doesn't completely fix them yet.

Test Plan:
grunt test