[Tizen] Sensor support

SensorProvider class is designed to abstract sensor framework and
provide all sensor related notification for xwalk (currently support
rotation, orientation, will support motion, compass, geolocation
and gyroscope in future). TizenPlatformSensor is the platform
depended part for Tizen mobile system. It is designed to not depend
Tizen in build time.
Use empty name to inject JS to avoid revealing code.

If we run a named piece of JS code, v8 will try to cache it, so in the
"Source" Panel of Devtools the JS code of extension will be revealed.

Just use an empty name to run extension JS code and output the exception
messages to log.
[Extensions] Remove CHECK() when destroying service

When running Crosswalk as a tool for manage packages (--install and
related parameters), the lifetime of Browser Process is different than
when running it for loading an application. In that scenario invariants
we expected do not hold anymore, in particular, we never enter the
codepath that destroys the in process extension server.

A better fix is to ensure that --install (and others) do not even create
XWalkExtensionService in the first place. A new issue was created for
that: https://github.com/crosswalk-project/crosswalk/issues/839.

BUG=https://github.com/crosswalk-project/crosswalk/issues/706
Enable Aura XWalk build by default

Enabled Aura by default for XWalk Linux and Windows builds, also enabled window frame and window header for XWalk Aura windows on Linux desktop.

The NativeAppWindowViews::CreateNonClientFrameView is now overridden only for Windows in order to make visible Aura window frame&header on Linux desktop (NativeAppWindowViews::CreateNonClientFrameView had been overridden to show OS window decoration instead chrome-style UI, however the used views::NativeFrameView works only on Windows).
[Tizen] Fix for build break caused by new version of NSS

Chromium requires new version of NSS => 3.14.3, while Tizen
has NSS version 3.12.9.This patch switches xwalk to use
openssl, until Tizen gets upgraded version of nss package.
[BuildFix] Fix build for -Dcomponent=shared_library

After rebasing to Chromium M31, Crosswalk stopped building when
gyp_xwalk is invoked with '-D component=shared_library' [1], throwing
several linking errors. This patch fixes the build by adding missing
dependencies to xwalk.gyp.

BUG=https://github.com/crosswalk-project/crosswalk/issues/859

[1] https://code.google.com/p/chromium/wiki/LinuxFasterBuilds#Dynamically_link
[Temp] [Android] A temporary way to enable WebGL for Android port.

This is a workaround because some platforms do not support the
GL extension 'GL_{ARB,EXT}_robustness' and the reset notification.
But the pass rate is pretty good for IA platforms. Suggest to
enable WebGL. Do it by using '--ignore-gpu-blacklist' because
it'll bypass this kind of checking.

BUG=#831
[Android] Add python script to parse and extract XPK file

The script will do:
1. Check the magic file header;
2. Verify the signature of the XPK file;
3. Extract the content of the XPK file to some folder.

It is used by make_apk.py.

BUG=https://github.com/crosswalk-project/crosswalk/issues/738
Merge pull request #860 from hmin/shared-build

Make XWalk can be built with -Dcomponent=shared_library
Merge pull request #857 from alexshalamov/fix_nss_break_use_openssl

[Tizen] Fix for build break caused by new version of NSS
Bump version to 2.31.15.0
[BuildFix] Add an explicit dependency on webkit_support.gyp:glue_child

This fix is to add an explicit dependency on webkit_support.gyp:`glue_child` to
`xwalk_runtime` target, otherwise, xwalk will throw an error message
saying 'HeapProfilerStart symbol is not found' at runtime.

BUG=https://github.com/crosswalk-project/crosswalk/issues/859
[Runtime] Change the runtime database backend to sqlite

Using Sqlite database instead of JSON format database, it will guarantee
data security and data integrity.

The source code is refered to the file sqlite_server_bound_cert_store.cc in
Chromium for the usages of sql::Connection.

The applications information will migrate from JSON DB to the new SQLite
DB automatically.

In Tizen package info installer, change the owner of SQLite DB files to "app" user,
since these files will access by "app" user when launch from home screen.

After bumped to Chromium 31, when compeling the xwalk with this patch, in
application_protocols.cc, there should be an error said: invalid use of
incomplete type ‘struct base::SequencedWorkerPool’, add the header file will
solve this issue.
[Runtime] Clean the JSON format applications database source code

The JSON format DB will not be used anymore, using SQLite DB instead, so
remove those excess code.
Merge pull request #845 from yongsheng/webgl

[Android] Enable WebGL for Android port.
[Android] Implement the http authentication in xwalk default client.

  The implementation is to provide the http anthentication
funtions to support the authentication requirement of some
web site related to username and password, covering the
following:
1 Import and implement a general class of HttpAuthDatabase
  to support common http authentication database interfaces.
  This class imports the android sqlite database to handle
  the username and password data on demand.
2 In default xwalk client, implement the method of
  setHttpAuthUsernamePassword() by calling the related method
  of HttpAuthenDatabase instance to set the username and password.
3 In default xwalk client, implement the method of
  getHttpAuthUsernamePassword() by calling the related method
  of HttpAuthenDatabase instance to query the username and password.

BUG=#784, #787
[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
Merge pull request #870 from hmin/build-fix

[BuildFix] Add an explicit dependency on webkit_support.gyp:glue_child
Merge pull request #769 from zliang7/master

[Tizen] Sensor support for crosswalk
Merge pull request #825 from ds-hwang/appcorenew

[Tizen] Introduce AppcoreContext to make Tizen task switcher be able to control Crosswalk's web applications.