[Android] Add onCloseWindow method to XWalkClient

It allows the XWalkView consumer to have a chance to handle the
window.close() calling from web page by overriding the onCloseWindow
method.
[Android] Add keystore and manifest test cases for packaging tool.

1. Create test_data directory for hosting test target file, such as:
   manifest, keystore etc.
2. Add keystore and manifest test cases for packaging tool.

BUG=https://github.com/crosswalk-project/crosswalk/issues/779
[Android] Handle exceptions during the cross package invoking

All exceptions was causing library-not-found dialog to show before.
It was not appropriate.

Now the implementation is that the exception are catagorized into:
1. Runtime library not installed;
2. Runtime library not up-to-date and it's critical;
3. Runtime library not up-to-date but bearable;
4. Error happening before version matching across package;
5. Error happening after version matching across package.
For the first four cases, a dialog will be shown to navigate user to
download/upgrade runtimelib with proper message.
For the last case, since the version is already matched, the exception
should be taken as a normal runtime exception and be thrown out.

BUG=https://github.com/crosswalk-project/crosswalk/issues/735
[Android] Implement mixed resources to fix resource not found

In shared mode, runtime client and library are in different packages.
It makes it easy to meet resource-not-found issue.

To fix that, class XWalkMixedResources is created to combine the two
resources into one. It will try to get resource from library first
and get from client when resource not found in library.

BUG=https://github.com/crosswalk-project/crosswalk/issues/796
[Android] Remove unused application customization

It's not necessary to override android.app.Application but
do nothing customized.
Remove them and just use android.app.Application in their
AndroidManifest.xml.
[Android] Fix the issue of '--app-root' and '--app-local-path'

For make_apk.py, if the option '--app-root' is required, it's
necessary to include the option '--app-local-path' as well.
Besides, split the test cases in 'testEntry' into 2 categories:
one is for testing correct cases and another is for failures.
[Android] Integrate external extensions in make_apk.py

The API for external extensions are basically ready so this is to
enable the packaging tool to package external extensions into web
app APKs.

To add one extension to be packged, developers need to do below steps:
1. Create a directory named 'foobar' and add 3 files called 'foobar.jar'
'foobar.js' and 'foobar.json' into the directory.
2. Package it when running make_apk.py:
   python make_apk.py --extensions="/path/to/foobar"

BUG=#558
[Android] make_apk.py should exit before it calls others when failed.

Because the current process only get the output of subprocess, but can't
get the exception from the subprocess, so the parent process can't check
whether subprocess failed, and continue to run the following script.

This patch forces the parent process to read the returncode of subprocess
before continue execution, and direct exit when the returncode doesn't
equal to 0.

BUG=https://github.com/crosswalk-project/crosswalk/issues/789
[Android] Add target to pack xwalk core library

And archive the tarball of xwalk core library.
The tarball will be used by cordova xwalk container.
Bump version to 1.29.10.0
[Extensions] Use a IO message loop for extensions running in a thread

Some extensions (like the RawSocket) will need this kind of main loop
for watching file descriptor events. The Chromium Socket implementation
asserts when used in a non-IO message loop.
Bump version to 1.29.11.0
[Extensions] Decouple the FunctionHandler from the Internal Extension Context

This is the first step for removing the InternalExtension class. The idea here
is to delegate the wrapping of callback ids to the FunctionHandler and make
it optional using composition.
[Extensions] Convert the parameters of the function handlers into a struct

The previous syntax was too verbose and now with the struct, adding
a new parameter won't cause a mass rename.
[Extensions] Remove the InternalExtension class

All the functionality was moved tho the ExtensionFunctionHandler and
can be optionally used via composition.
Bump version to 1.29.12.0
[Tools] Adjust increment-version.py's style to Google's.

In other words, replace unix_style_functions() with CamelCased() ones.
Bump version to 1.29.13.0
[Tizen] Introduce AppcoreContext to make Tizen task switcher be able to control
Crosswalk's web applications.

Crosswalk's web application must communicate with Tizen application framework.

The most important task we need to do is to call appcore_init() in Tizen.
appcore_init() connects Tizen task manager via IPC. After calling
appcore_init(), the given process that called appcore_init() can communicate with
Tizen task switcher.

AppcoreContext calls appcore_init() with a callback function, and handles
messages in the callback function. Currently, AppcoreContext handles only
AE_TERMINATE message. When AppcoreContext receives AE_TERMINATE message,
AppcoreContext quits the Crosswalk. The task switcher sends AE_TERMINATE message
when an user kills the app on the task switcher.

AppcoreContextImpl uses private Tizen appcore API to reuse Tizen 2.0 implementation.
This private implementation of appcore is a bit huge. We will decide later
whether to maintain the code similar to appcore private implementation in Crosswalk
or not after investigating appcore in Tizen 3.0.

To concentrate Tizen implementation detail on cc file, we declare
AppcoreContextImpl that extends AppcoreContext in cc file.

NOTE: this implementation is not compatible with shared process mode, because
Tizen task switcher cannot recognize multiple tasks per process. Shared process
mode requires one Crosswalk process to include multiple tasks (= web applications).
It is not supported by current task switcher.

appcore_context.cc is similar to a part of appcore-efl.c in appcore.

BUG=https://github.com/otcshare/crosswalk/issues/609