[Android][Extension] Fixed getCPUInfo algorithm for device capabilities

The original algorithm is not accurate because it ignores the time spent in iowait,
irq and softirq. Now the result is the same as `top` shows.
[Android] Fix app will crash at exit if runtime lib not found

It's because, the code is trying to get a boolean value from
method onKepUp in runtime. It will return null if runtime lib
not found.
For other class like String, return null is OK. But for boolean,
java will try to turn Boolean object null into boolean, which
causes NullPointerException.

BUG=https://crosswalk-project.org/jira/browse/XWALK-627
[Mac] Fix compilation of xwalk_builder target.

This means that the tests can be compiled and run.
[Android][SysApps] Change event names according recent spec changes.

Refer to https://github.com/sysapps/device-capabilities/issues/14, the event
names changed as below:
    attribute EventHandler  onstorageattach;     // was onattach
    attribute EventHandler  onstoragedetach;     // was ondetach
    attribute EventHandler  ondisplayconnect;    // was onconnect
    attribute EventHandler  ondisplaydisconnect; // was ondisconnect

At the same time, fixed a bug to allow pass null as callback of "onEventName".
[Android] Reduce the time consumption for make_apk test (2).

Fake an empty native library "libxwalkcore.so" in make_apk test
for embedded mode. It would greatly reduce the time consumption
caused by copying library when generating the apk in embedded mode.
Implement the public user agent methods in runtime.

  The user agent is not supported in crosswalk runtime. This is
to implement the public user agent methods for crosswalk, it adds
the corresponding user agent description according to the specific
platform type.

  Base on the ZTE975 Build/JDQ39, the user agent string is listed as follows:
Mozilla/5.0 (Linux; Android 4.2.2; ZTE 975 Build/JDQ39) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/32.0.1700.14 Mobile Crosswalk/3.32.49.0
Mobile Safari/537.36

BUG=https://crosswalk-project.org/jira/browse/XWALK-595
[Android] Refine the scripts for generating app packaging tool.

Currently there are lots of issues to generate app packaging tool:
1. Lots of unneeded class files are copied.
2. Two .dex.jar files are not needed by app packaging tool.
3. Some internal Java files like NativeLibraries are compiled when
packaging web apps. They should be handled internally inside of
xwalk runtime.
4. Refine the code for generating app packaging tool.
5. Invalid the python file mode.
6. Merge two jars for runtime activity and runtime client.
Fix all above issues with the changes for gyp generation and the
generation python tool.

BUG=https://crosswalk-project.org/jira/browse/XWALK-608
[Runtime] Add application main document manifest handler

With this manifest handler we can access the application main document related
info directly from MainDocumentInfo instead of parsing the manifest manually.
An unit test for the handler is also added.
[Runtime] Basic application onLaunched event support

In order to follow the main document lifecycle events, we need to launch the
application through "onLaunched" event.

Different from Chrome onLaunch event
(http://developer.chrome.com/apps/app_runtime.html#event-onLaunched), we will
only support xwalk.app.runtime.onLaunched(function callback) without launchData
object. The callback will be called without any parameter when the application
is launched explicitly (from home screen launcher or from command line).
[Runtime] Add application onLauched event browser test
[Runtime] Implement onSuspend event support.

"onSuspend" event is sent to the main page before it is closed.
This gives the application an opportunity to do some clean up.

When application process manager finds that the last open window is closed,
it sends 'onSuspend' event to main page. The event handler is
executed first in main page, then a finish event is sent out.

The application process manager is an observer of finish
event so that it closes main page when notified.
[Application][Linux] Make '/running' a D-Bus object manager

This patch adds the D-Bus object representing a running application (at
the moment Crosswalk supports only one at a time). A running application
will export a Terminate() operation.

The patch makes sure that the cycle Launch -> Terminate works,
correctly, even if by non-ideal means. We'll fix as Crosswalk
application/ support is being reworked.
[Packaging] Remove generate-flat-tree.sh.

Enough time has passed with us using gbp-flat-tree.sh by default in release
and build bots (as well as individually) and nothing has broken. We can
finally retire the old generate-flat-tree.sh script.
[UI][Tizen] Adopt a simple layout scheme for TizenSystemIndicator landscape

Now TizenSystemIndicator in landscape mode will adopt a simple layout
scheme, the same as the portrait mode.

This is a palliative solution, while we don't implement the overlaying
layout and the event support in landscape mode.
[Application] Move ApplicationSystem creation to a factory function

This will be used to provide different subclasses for the different
platforms. The factory function isolates the caller code from this
detail.
[Tizen] Move sensor related files to xwalk/tizen

And directly link with tizen sensor library.
[Application] Create ApplicationSystemLinux

This commit gets rid of the general interface ApplicationSystemProvider
that wasn't bringing anything to the table besides memory management.
Other platforms that will use run-as-service mode should add their own
needed objects in the platform specific versions of ApplicationSystem.

The ApplicationSystemLinux now creates the service provider if
needed. The function is_running_as_service() was made virtual (and
renamed to reflect that is not a simple accessor anymore).
Bump version to 3.32.51.0
[Android] Exclude the gdbserver from release mode of packaging tool.

The gdbserver is used for debugging XWalk, which should not be included
in the release binary of packaging tool. Because it would introduce additional size
of the binary.

So exclude gdbserver binary from release version and leave it for debug version
the same as that for xwalk_core_library.
[Runtime Model] Refactor the Application Storage system.

Rename ApplicationStore to ApplicationStorage, DBStoreSqliteImpl to
ApplicationStorageImpl.

Add the system events setter/getter method in ApplicationData, so that
all application related information can be cached in it.