[Runtime] Fix application event router observer detach iteration bug
[Runtime] Add calls to ApplicationEventManager

ApplicationProcessManager will calls OnMainDocumentCreated when main document is
created. ApplicationService will calls OnAppLoaded when Application object is
instantiated.
[Runtime] Add application event extension support

Currently application event extension API follows Chrome.events definition
(https://developer.chrome.com/apps/events.html).

Implementation details:
The event extension instance will runs on UI thread and implement EventObserver
interface to observe registered events from JS. When event happens it will
dispatch the event through an IPC msg with "dispatchEvent" command. The JS in
renderer side will then dispatch event to corresponding event listeners.

To provide a method to get the event dispatch status an event type prefix with
"onDispatchEventFinish_xxx" is introduced. Other observers can attach to such
events and get notification when "xxx" event is finished the dispatching in JS.
[Runtime] Add application event API browser test