Add will-insert-event with cancel() function

autocomplete and go-to-line both preempt the `textInput` event to prevent character insertion. 

This pull provides the editor with a `will-insert-text` event that passes a `cancel()` function as a param. The consumer can call `cancel()` when it wants to prevent the insertion. No more preempt!

This was originally in #3132, but was pulled out as it is necessary for proper mini-editor behavior. 

See atom/autocomplete#40 and atom/go-to-line#9 for package fixes.

Closes #3075
Yeah, I thought that we usually assume that the editor always has at least one cursor and selection unless it is destroyed so I'd say :fire: it unless that assumption has changed.