Merge pull request #2129 from wang16/keydispatch_api

[Android] Refine the key event dispatch for xwalkview
[Tools] Move most of the generate_gclient-xwalk's logic to DEPS.xwalk.

Most of the code in generate_gclient-xwalk.py should not exist: it
functioned mostly as a translator that read values from DEPS.xwalk and
changed them into a format suitable for gclient.

We can get rid of this intermediate step by writing DEPS.xwalk in a
gclient-compatible format. In practice, this means that DEPS.xwalk is
now responsible for:

* Setting git revision values for repositories we track, such as
  chromium-crosswalk and ozone-wayland (as before).

* Automatically ignoring some directories in the checkout.

* Setting variables parsed by gclient, such as |solutions|.

All this also allows us to remove a lot of validation code that was
scattered around generate_gclient-xwalk.py.

generate_gclient-xwalk.py now exists merely for compatibility, as it
still needs to parse the XWALK_OS_ANDROID environment variable and the
--cache-dir option and append a few more lines to .gclient-xwalk
accordingly. I can see these features being moved somewhere else and the
script getting removed altogether in the future.

This is a significant step in the preparations for XWALK-1894.
[Android] Display no scaled image when no border specified in LaunchScreen

When no border specified in the manifest, the image should not be scaled, just display
the image centered in the screen.

BUG=XWALK-1998
[Tizen/Desktop] Re-organize storage partition management

This patch removes storage partition cleanup logic from Application
Storage and Package Installer making them completely independent
from browser content API layer. Hence now both of them can be used
outside the browser process (e.g. from 'xwalkctl').

The Application Storage implementation is now much simpler which is
very important as we have plans to create an alternative Application
Storage implementation for Tizen, based on the platform 'app_info.db'.
Bump version to 8.36.161.0
[Android] Adjust annotation of Embedding API for documentation

Before reflection layer for shared mode lands, there are still
public methods in org.xwalk.core which are not supposed to be
Embedding API. So we still need to support doclava for now.

This commit includes following changes:
1, Reorder the declare sequence to make Exposed APIs prior to the
internal one with the same function name (which takes internal
class as paramter).
2. Add @since tag for all APIs, although since tag is not supported
in doclava, it's still worth to do it for API maintenance. This
also applies to the internal classes, before in future, the annotation
in org.xwalk.core will be generated from org.xwalk.core.internal by
script. So for now, we need to keep them synced.
3. Add @hide to the non-Embedding API public methods.

Related Bugs: XWALK-1856, XWALK-2017
[Android] Hook the native destroying of XWalkview into GC

Now we need to restrict users to explictly call the onDestroy method
of XWalkView to make sure the native part of XWalkView will be
destroyed. The patch leverages the solution in Chromium and remove
the restriction.

BUG=XWALK-2010
Merge pull request #2137 from xingnan/2010

[Android] Hook the native destroying of XWalkview into GC
Merge pull request #2138 from wang16/api_doc

[Android] Adjust annotation of Embedding API for documentation
Merge pull request #2136 from pozdnyakov/storage_partitions

[Tizen/Desktop] Re-organize storage partition management
Merge pull request #2135 from rakuco/preparation-for-xwalk-1894

[Tools] Groundwork for tracking Chromium's dependencies with git.
[Tools] Use .gclient's value of |cache_dir| in .gclient-xwalk.

The previous approach was not easy to use at all, as one had to manually
call `gclient sync' with --nohooks, call generate_gclient-xwalk.py
manually with --cache-dir and then run the other hooks.

Instead, just use the same value as .gclient so that all repositories
are cached in the same location, thus also reducing the differences
between .gclient and .gclient-xwalk.

--cache-dir is still accepted and used if passed for compatibility
reasons; support for it can be removed altogether in the next major
version (Crosswalk 8).

Related to XWALK-1184 and XWALK-1894.
[Android] Prompt dialog when CPU architecture mismatch

Previous commit c86dcf7e fixed running ARM on x86.
It was broken, due to the MACRO used to detect CPU
architecture now needs including a header file.

For the opposite, if installing x86 crosswalk on ARM,
the native library will not be available at all.
(ARM native library could still be run on x86 devices, but slow).
A ProcessInit exception will be thrown instead of an
UnsatisfiedLinkError which is expected in previous commit.
To fix this, try to find the UnsatisfiedLinkError in the cause
chain of the exception met while initiating crosswalk.

BUG=https://crosswalk-project.org/jira/browse/XWALK-2011
Merge pull request #2139 from rakuco/cache-dir-from-dot-gclient

[Tools] Use .gclient's value of |cache_dir| in .gclient-xwalk.
DEPS.xwalk: Start tracking all Chromium dependencies from git.

Chromium is soon going to switch its canonical source repository to git
and we would have to follow suit anyway. In addition, this makes it
easier to cache directories across machines and, in some cases, the
network communication is faster and more reliable when using git.

Most of the work was already done in previous commits that moved the
majority of the logic in generate_gclient-xwalk.py to DEPS.xwalk itself.

We now simply have to adjust the solutions set in DEPS.xwalk, so that
instead of checking out a Chromium release directory from SVN and
pulling all Chromium dependencies from its DEPS file (which points to
SVN repositories for everything) we point directly to chromium-crosswalk
(which was recently adjusted to contain the commit adjusting DEPS and
.DEPS.git for a certain Chromium release) and its .DEPS.git.

The only unusual part of this commit is the moving of Ozone-Wayland to a
separate gclient solution: we need to do that because it has a .DEPS.git
which overrides gclient's recursion limit and would cause problems
because it too would try fetching Chromium. We explicitly set
|deps_file| in this solution to "" to prevent that.

BUG=XWALK-1894
Merge pull request #2140 from wang16/fix_x86_on_arm

[Android] Prompt dialog when CPU architecture mismatch
Bump version to 8.36.162.0
[Tizen][Runtime] Fix allow-navigation element can not take effect if there are more than 1 in config.xml.

In Tizen core spec, it's said that "if more than 1, the first occurrence MUST be considered (and all others
ignored)." This patch makes the runtime following the spec.

BUG=XWALK-1696
Merge pull request #2133 from kurli/launch_screen_image_fix

[Android] Display no scaled image when no border specified in LaunchScreen
[Tizen] Do not use Crosswalk daemon when installing webapps

The Crosswalk installer shouldn't depend on the Crosswalk service
to be running in order to install applications. This is needed for
example to be able to install applications before the system has
booted.

BUG=XWALK-2028