Before, on and after events
Before, on and after events

Initial implementation of before, on and after events. Also moved dom
observers out into a new method api.observe.on_dom to clean up the
api.observe.on method which is already carrying extra code to support
backwards compatibility.

mvnnn/gmail.js,MaxMillion/gmail.js,KartikTalwar/gmail.js,aneurycasado/gmail.js,kaushik94/gmail.js,avzabr/gmail.js,wakermahmud/gmail.js,esperco/gmail.js