[Mac] Fix the build

[chromium-style] Overriding method must have "virtual" keyword.
[Android] Handle android Action Uris

These Uris are used for android intent to start
activities to:
1. make phone calls;
2. send sms;
3. send emails;
4. look up map for geolocation;
5. search apps in market.

BUG=https://crosswalk-project.org/jira/browse/XWALK-226
    https://crosswalk-project.org/jira/browse/XWALK-155
    https://crosswalk-project.org/jira/browse/XWALK-154
TEST=org.xwalk.core.xwview.test.HandleActionUriTest
[Android] Fix the issue that geolocation information can't be fetched.

The geolocation related Web API can't work due to the problem of crosswalk.
The root cause is that the activity status is not initialized so that
internal features like location provider can't get the correct status.
Fix it by passing the application to content layer and add the permissions
in AndroidManifest.xml.

BUG=https://crosswalk-project.org/jira/browse/XWALK-151
[Application] Move package details inside ApplicationService

These are details for package installation that belong to
ApplicationService object, which is responsible for installation and
uninstallation of packages.
Build fix, destructor must be virtual

RuntimeRegistryObserver has virtual methods, so destructor must be virtual.
This check is enforced on the Mac and the build fails.
Don't use namespace directive in global context in header

On Mac, the build fails with
../../xwalk/sysapps/raw_socket/raw_socket_object.h:11:31: error: using namespace directive in global context in header [-Werror,-Wheader-hygiene]
[Android] Allow geolocation context permission for crosswalk.

Geolocation context permission has to be handled in crosswalk for Android
port. It's used to allow geolocation access for origins. This fix is to allow
requests from different origins for geolocation information with the
in-memory cache mechanism.
Currently we allow all origins to access the geolocation information
if the web app is granted with the permission.

BUG=https://crosswalk-project.org/jira/browse/XWALK-151
Sort file names in xwalk_application.gypi
[Android] Disable one test case about remote debug.

This patch disabled the test case "testDisableRemoteDebugging".
It is failed on trybot, but passed on buildbot. It can not be
reproduced on local machine.
It will be enabled later when we find the root cause.
Merge pull request #1113 from yongsheng/xwalk151

[Android] Allow geolocation context permission for crosswalk.
[Android] Add runtime core API copyBackForwardList

1 This class contains the back/forward list for a XWalkView.
XWalkView.copyBackForwardList() will return a copy of this class
used to inspect the entries in the list.
2 Add the API of XWalkView which is needed by the Cordova Container.
3 Implement BackForwardList and WebHistoryItem by wraping
org.chromium.content.browser.NavigationHistory class.

BUG=https://crosswalk-project.org/jira/browse/XWALK-330
[Android] Add runtime core APIs saveState/restoreState

1 XWalkView.saveState() saves the state of the XWalkView to a
Bundle; XWalkView.restoreState() restores the state of the
XWalkView from a given Bundle.
2 Add the two APIs of XWalkView which are needed by the Cordova
Container.

BUG=https://crosswalk-project.org/jira/browse/XWALK-330
[Android] Add saveState, restoreState test cases

Disable one test case as there is a blocking issue in
core test framework.

BUG=https://crosswalk-project.org/jira/browse/XWALK-330
Merge pull request #1126 from wuhengzhi/remotedebug

[Android] Disable one test case about remote debug.
Merge pull request #1091 from xingnan/backforwardlist

Add core APIs: copyBackForwardList, saveState, restoreState
Merge pull request #1094 from wang16/external_protocol

[Android] Handle android Action Uris
[Packaging] Introduce gbp-flat-tree.sh to simplify the Tizen build process.

TL;DR: one can simply do the following to build an RPM:
  cd /path/to/src/xwalk
  gbs build -A i586

We can get rid of the need for a separate git tree and the
generate-flat-tree.sh script by relying on the hooks provided by
git-buildpackage: the postexport hook that we use is called right after the
git repository's sources have been exported with `git archive`.

In this hook, we execute a new script, `gbp-flat-tree.sh`. It does pretty
much the same thing as generate-flat-script.sh, but automatically. That is,
it removes the tarball generated by `git archive` (since gbs build should be
called from xwalk/, it would only contain Crosswalk's contents anyway) and
replaces it with a new one with the contents of src/.

Since it is called at a stage in the whole build process that immediately
precedes the call to `/usr/bin/build`, we do not need to keep a separate
flat git tree with all our sources anymore; we are effectively bypassing
git-buildpackage's default export mechanism.

The downside of this approach (which is shared by the previous one with
`generate-flat-tree.sh`, anyway) is that all files in src/ are archived,
even if they are not part of any commit. In other words, we end up acting as
if "--include-all" was always passed to `gbs build`.

(Fun fact: the whole dance of calling `gclient recursive` twice with
different arguments and everything was unnecessary; one of the entries
reported by those calls is src/ itself, so we always ended up archiving
everything under it)
[Application] PackageInstaller doesn't need to be RefCounted

That capability is not used in the code, so it's better to remove it. An
unused constructor was also removed.

This patch also adds a small class comment to PackageInstaller.
[Application] Move handling of management commands to ApplicationSystem

This patch is more about moving this logic out of XWalkBrowserMainParts
to a more reasonable location. We may decide to move this handling code
later (to hid it more) when implementing the IPC-based handling of the
mode.

Another outcome is that the logic for launching applications (and all
its cases) is clearer now.
[Application] Move logic for launching app to ApplicationSystem

Main motivation was to abstract this complexity away from
XWalkBrowserMainParts. ApplicationSystem now deals with the different
ways to pass the app id in the command line.

It turns out that after the refactoring, we can see that Tizen sensor
initialization wasn't being called in some cases when running
applications.