Rename xwalk.app API to xwalk.app.runtime

In order to align with Chrome runtime API naming
(https://developer.chrome.com/apps/runtime.html), we changed xwalk.app.* APIs to
xwalk.app.runtime.*.
Move application runtime extension from extension thread to UI thread

After PR #1080(https://github.com/crosswalk-project/crosswalk/pull/1080) we can
run application extensions on UI thread now.

The internal application extension code used to run on extension thread while
most of the application service code runs on UI thread. This means now we don't
need to post task to UI thread and get its result back in extension thread back
and forth anymore. This will make the code more clean and straight forward.
Fix application event router observer detach iteration bug
Add calls to ApplicationEventManager

ApplicationProcessManager will calls OnMainDocumentCreated when main document is
created. ApplicationService will calls OnAppLoaded when Application object is
instantiated.
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 is implemented as an internal extension running on UI
thread. Its instance implements application::EventObserver interface to observe
registered events.

When a listener of an event is added for the first time, the extension instance
will save the wrapped dispatchEvent callback. Then when such event is notified,
the extension instance will call the wrapped callback to run all added
listeners.
When all listeners are removed from an event, the extension instance will detach
itself from the event through event manager, the corresponding saved callback
will also be removed.

To provide a method to get the event dispatching status an event type prefix
with "onDispatchEventFinish_xxx" is introduced. Other observers can attach to such
events and get notification when "xxx" event has finished its dispatching in JS.
Add application event API browser test
Merge pull request #2 from seanlong/wrt-team_master

application API review pending patches