[Android] Support permissions for Java external extensions

Following changes are made:
1. merged external extensions permissions to Android manifest file
2. added a unit test about this feature
3. fixed empty extension_name issue caused by redundant separators

BUG=https://crosswalk-project.org/jira/browse/XWALK-160
[Android] Add the test case about getVersion.

This patch contains the test about getVersion in shared and
embedded mode. It's for the runtime client.
Get the version, confirm it's validity by regular expression.
Remove dependency between XWalkManifestReader and XWalkView.

XWalkManifestReader is in org.xwalk.runtime package, it's on higher
layer than XWalk core, and XWalkManifestReader should not be awared
by XWalk core. So remove the XWalkManifestReader reference from the
XWalkView class.

BUG=https://crosswalk-project.org/jira/browse/XWALK-149
[Android] Only allow to intercept navigation for main frame and subframe

The interception for resource request should be restricted to main frame
and sub frames, so that the page loading state change events, e.g.
onPageStarted and onPageFinished, are triggered only for main frame and sub
frame instead of each kind of resources.

BUG=https://crosswalk-project.org/jira/browse/XWALK-306
[Android][Tizen][SysApps] Change the sysapps API namespace for device capabilities

Change the sysapps API namespace from navigator.* to xwalk.experimental.*
Remove the patcher script and its dependencies.

We don't need it anymore as the V8 patch for the XDK has been removed.
We can revert this patch if one day in the future we need that.
Merge pull request #1170 from darktears/removal-patcher

Remove the patcher script and its dependencies.
[Extensions] Add an ExtensionServer to the UI Thread

Currently for the in-process extensions, there is a separated thread
for running the extensions. This patch adds an ExtensionServer to the
existing UI Thread, which will allow extensions that interacts with
the UI or are limited because of main loop integration to run on the main
thread.
[Extensions] Make it possible to query an ExtensionServer for an extension

This function will be used to decide on which thread the extension has
to be created.
[Extensions] Route messages to the appropriated server

Based on the extension name and the extension ID, we route the messages
to the appropriated ExtensionServer running on the Extension thread or the
UI thread.

On the in-process extensions, 2 messages that are normally directed to the
ExtensionServer on the Extension Process are now completely handled by the
filter. One example is the GetExtensions message that has to combine a list
of available extensions from two different servers in a single reply.
[Extensions] Run external extensions on the UI Thread when extension process is disabled

When the extension process is disabled, external extensions will run on the UI
thread of the browser process by default. This is done because external
extensions are expected to run in the main thread of the process it is running.
[Extensions] Run tests on the UI Thread by default

But keep hooks for running tests on the Extension Thread if need. Extensions
requiring IO main loop will need that.
[Extensions] Add browser tests for in-process extension threads

This test verifies if extensions registered to the UI Thread are
indeed running on the UI Thread. The same applies for extensions
registered to the Extension Thread.

We also test if messages (sync and async) are working on both scenarios.
Fix build on Mac by handling the return value of SQLite calls.

Handle the return value and print a message error if the request failed.
Merge pull request #1080 from tmpsantos/ui_thread

[Extensions] Make it possible to run extensions on the Browser Thread
[Extensions] Fix memory leak

ExtensionData was being removed from the map but the pointer was not
being deleted.
[Extensions] Move XwalkExtensionData to its own file

This patch simply move bits around. The idea is ExtensionData is
becoming to complex to the point it deserves to be self-contained.
[Extensions] Make XWalkExtensionData a class

Add getters and accessors to XWalkExtensionData and make its attributes private.
The most important aspect here is we move the logic of how to delete the
objects owned by XWalkExtensionData from the XwalkExtensionService back to
XWalkExtensionData, making the lifecycle more consistent.
Merge pull request #1171 from darktears/mac-build-fix

Fix build on Mac by handling the return value of SQLite calls.
Merge pull request #1145 from tmpsantos/extension_data

[Extensions] Move XWalkExtensionData to its own class