Add initial support for application Event object

An application event is an event send to application and will be handled by main
document. It's different from normal DOM event which originated from the DOM
element. The application event API will provides an interface to add/remove
listeners which will be called when some application event happens.

Currently the application Event object support is an implementation of
chrome.events.Event API(https://developer.chrome.com/apps/events.html) subset.
Event.addListener, Event.removeListener, Event.hasListener and
Event.hasListeners APIs are supported.