Add convenient event methods to all event-emitting objects

i.e. linehandle.on, markedrange.off, etc.
[activeline addon] Don't get confused by collapsed spans

Issue #1668
[smartymixed mode] Add
[smartymixed mode] Integrate
[vim] Disable insert mode if document is readonly
Fire DOM event from contextmenu handler

Issue #1674
[real-world used] Add CodeZample
[closebrackets addon] Do not insert pair of quotes right after the word