[Android] Cancel library-not-found dialog when library installed

For xwalk apps on Android, they will try to find runtime lib at
startup time. If runtime lib not found, an alert dialog will be
prompted for navigating user to download it from play store.

When the app is brought back to the front, it will check
runtime lib's existense. If runtime lib found, the alert dialog
should be automatically canceled.

BUG=https://github.com/crosswalk-project/crosswalk/issues/638
[Android] Add navigation handler for handling platform-specific schemes.

Some platform-specific schemes are needed to be handled, eg, "wtai://", we
provide default navigation handler in XWalkView to support such schemes.

"wtai://" is a protocol scheme that can initiate a dialog with the mobile phone
user whether to place a call to that number, send an SMS message, or store the
number in the address list of the mobile phone.

See: http://www.w3.org/wiki/UriSchemes/wtai

In this patch we support placing a call. And other functions will be added later.

BUG=https://github.com/crosswalk-project/crosswalk/issues/380
[Extensions][Windows] Enable ExtensionProcess for Windows
[Build] Generate `xwalk_version' from the VERSION file.

One less place that defines the current version, we're on our way to
defining it in only one file.

Borrow Chromium's chrome/tools/build/version.py utility to read the value in
VERSION and get an appropriate version number for it.

Some places in xwalk.gyp depend on the version but are not automatically
regenerated/rebuilt when VERSION changes, but that was also the case before,
and fixing that isn't trivial, so let's defer that part.
Separate Client<->Server messages from regular Extension messages

IPC has a way to identify the messages by "class", based on the MsgStart
identifier, by using the IPC_MESSAGE_CLASS() macro. This will make
filtering of messages for client<->server interface easier.
Make extension instances run in a single shared thread

This is a change on the execution model of the extensions. The code for
each instance used to run in its own thread. In the Browser Process, for
in-process extensions, they'll run in a dedicated extension thread. In
the Extension Process, they'll run on the main thread. Of course,
extensions still have the freedom to create their own threads.

Two main reasons for changing execution model are:

(a) In practice our use cases for external extensions, instances needed
to interact with glib-based libraries, and all the callbacks ended up
going back to the main thread. We were not collecting much benefit of
implicitly creating threads.

(b) Sharing data between instances now will be easier, since it won't
imply sharing data between multiple threads. One common problem is that
when writing instances, the jump from "simple case" to "multithread
bugs" was too small. It was too easy to face race conditions without
being aware of them.

One notable change is that we stop using XWalkExtensionRunner
abstraction. Now that we have an object dedicated to manage the
instances (XWalkExtensionServer) we don't really gain much from the
indirection -- as can be seen in the patch diff.
Remove XWalkExtensionRunner abstraction

We don't use this anymore. It made sense back in time when there were
not a specialized object to handle instances (we now have
XWalkExtensionServer) and when there was complex logic involved in
running each instance in a separated thread.
Remove post_message callback from CreateInstance()

Instead of passing the same callback everytime an instance is created,
we may use the (already provided) SetPostMessageCallback() method.

This is preparation for the next commit, if we didn't this first we
would need to add another callback to CreateInstance to maintain consistency
which would increase the noise generated by the change.
Add SetSyncReplyCallback() method

This will allow to a handler to be set to deal with Sync Callbacks,
the main difference with the "old" way is that now there's no restriction
that the reply must be set during the SyncMessage handler.

As we can have at most one pending reply per instance, it makes sense to
keep the pending replies in the same struct as the instances map.
browser_test: Add a test for SyncMessage delayed reply
Fix coding style errors
Merge pull request #655 from wang16/lib_check

[Android] Cancel library-not-found dialog when library installed
Fix Android code after changes in XWalkExtension
Merge pull request #677 from cmarcelo/execution-model

Don't create new threads for each instance
[Android] Generate chrome version for the frontend url of devtools

Instead of hard-coding the chrome version in devtools server, we generate the
correct chrome version automatically from chrome version information.

BUG=https://github.com/crosswalk-project/crosswalk/issues/687
Merge pull request #691 from hmin/chrome-version

[Android] Generate chrome version for the frontend url of devtools
[Mac] Fix for build

Use <sys/prctl.h> and prctl() only on Linux (OS_LINUX) and not Posix (OS_POSIX).

This seems to be the way Chromium guards the items.
Merge pull request #685 from rakuco/version-from-VERSION

[Build] Generate `xwalk_version' from the VERSION file.
Bump chromium-crosswalk in DEPS.xwalk.

Bring in fixing in android testing facility for emulater support.
Add generated main document URL request job support

A generated main document is an empty HTML document which <body> tag contains
JavaScript files specified in manifest.json. Ref to:
http://anssiko.github.io/runtime/app-lifecycle.html#a-single-entry-point-to-the-application

The GeneratedMainDocumentJob implementation is borrowed from Chromium extension
GeneratedBackgroundPageJob. When a URL request matches
"_generated_main_document.html" file name the job will be created and returns
the generated content.