Added block-based callback API while performing touch gestures.

This allows i.e. in view unit tests to capture intermediate state that should have been set or maintained while a gesture or event is being processed.