Adding optional callback argument to `setState`

We eventually want to batch calls to `setState` for performance reasons, and this no longer guarantees immediate, synchronous execution of these calls to `setState`.  As such, this commit adds an optional callback parameter so that actions can be taken once the call actually runs.

@phunt says we shouldn't make the synchronous operation guarantee and @jordow  agrees.