[Android] Fix crash issue in Android extension system

On Android, the extension objects and instances are deleted explicitly
by JNI invokation from Java side. However, both extension objects and
instances are designed to be owned by XWalkExtensionServer, it means
that only XWalkExtensionServer is allowed to delete them, otherwise a
pointer would be deleted twice and cause crash issue.

This fix is to address the above issue and make sure the extension
objects and instances are owned by XWalkExtensionServer. Moreover, the
extension objects on native side will be alive in the whole process
lifecycle and reused by Java-side if resuming back.

BUG=https://crosswalk-project.org/jira/browse/XWALK-821
[Android] The mapping of permissions to AndroidManifest.xml.

  This feature provides the support of mapping the manifest permissisons
to AndroidManifest.xml for the web app user in packaging tool. It provides
the function interface of mapping the permissions from manifest.json to
AndroidManifest.xml based on the field parser and mapping table. It suppports
the mapping of permission fields both defined in Crosswalk and supported by
Android Manifest specification. The test cases are added accordingly.

BUG=https://crosswalk-project.org/jira/browse/XWALK-651
Implement Screen Orientation API through extension (Part 1)

Spec: https://dvcs.w3.org/hg/screen-orientation/raw-file/tip/Overview.html

This patch implemented lockOrientation and unlockOrientation API through extension.
And the followed patchs will implement onorientationchange event.

Test: http://jsbin.com/IJapIVE/4

BUG=https://crosswalk-project.org/jira/browse/XWALK-162
[Android] Use interceptor for app scheme on Android

It's a hot fix, the app scheme protocol handler need to polish
for different platform.
The previous commit 1a01300019d3 removes the condition for adding
app scheme handler. But on Android, the app scheme handler is
different and added in UrlRequestContextGetter, which is more appropriate
place to add protocol handler by the way.

This commit uses interceptor for android app scheme handler instead to
avoid set app scheme handler multiple times. Otherwise, it causes crash
on debug build and white screen for app url on release build.

BUG=https://crosswalk-project.org/jira/browse/XWALK-867
Merge pull request #1462 from yinli/screen_orientation_api

[Android] Implement Screen Orientation API through extension (Part 1)
Merge pull request #1442 from hmin/duplicated-instance-deletion

[Android] Fix crash issue in Android extension system
[Android] Change screen_orientation_api.js path for building

Android and Tizen platform are sharing the same screen_orientation_api.js file.
Merge pull request #1499 from yinli/change_path

[Android] Change screen_orientation_api.js path for building
Merge pull request #1496 from tmpsantos/devcap_display

[SysApps] Implement the Device Capabilities getDisplayInfo()
[Application] Parse WGT manifest as if it were a XPK manifest

Since the current code is too tied on an application being packaged in the
XPK format -- and thus assuming things are using a "low level" representation
of its metadata, it is simpler in this stage to just parse the XML file from
WGT widgets and create the same in-memory data that the XPK packages contain.
[Application] If loading from WGT, use provided Tizen App ID from config.xml

The Tizen App ID must be used instead of the Crosswalk auto-generated one as
some features require it.  MessagePort is one example: applications
uses these IDs to create the necessary communication channels.
[Application] Load application after it has been extracted

Required to obtain the application ID from config.xml. Won't make any
difference for XPK-packaged applications.
[Tizen] Consider legacy Tizen IDs as valid IDs

Modify the ID validation function to also accept the 10-character ID that is
used by Tizen for application IDs.  Keep the XPK ID validator as well if the
ID size is different from 10.
[Application] Compare application IDs in a case insensitive way

When loading a resource from an `app://` URL, the application ID is used as
a hostname.  GURL converts that to a lowercase string, which makes it
impossible to use the URL hostname as a key to ApplicationDataMap if
Crosswalk is loading resources from an application that has been packaged in
WGT format.

Modify the ApplicationDataMap typedef to perform case insensitive search.
[Tizen] Consider "app://" protocol while loading web-ui-fw data
[Runtime] If running on Tizen, look for Tizen extensions by default
Merge pull request #1497 from wang16/fix_try_bot

[Android] Use interceptor for app scheme on Android
Merge pull request #1432 from ShDavidliu/permissions

[Android] The mapping of permissions to AndroidManifest.xml.
Merge pull request #1490 from lpereira/wgt-as-xpk

Add support to load WGT packages on Tizen
[application] Add a multiple applications test

Add an in-browser test making sure that running of multiple applications within XWalk runtime process works correctly.
Besides this patch contains a fix of a crash on Application exit (crash had been discovered with the newly added test).