[Mac] Fix compilation of xwalk_builder target.

This means that the tests can be compiled and run.
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
Merge pull request #1233 from seanlong/event_router

[Runtime] Application main document manifest handler and onLaunched event support
Merge pull request #1278 from ShDavidliu/public_user_agent

Implement the public user agent methods in runtime.
Merge pull request #1265 from yongsheng/refactorembedded

[Android] Refine the scripts for generating app packaging tool.
[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.
Merge pull request #1234 from shaochangbin/onSuspend

[Runtime] Implement onSuspend event support.
Merge pull request #1286 from darktears/xwalk_builder

[Mac] Fix compilation of xwalk_builder target.
Merge pull request #1284 from cmarcelo/running-apps-manager

[Application][Linux] Make '/running' a D-Bus object manager
[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.
Merge pull request #1292 from rakuco/remove-generate-flat-tree

[Packaging] Remove generate-flat-tree.sh.
[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.
Merge pull request #1291 from ricardotk/indicator

[UI][Tizen] Adopt a simple layout scheme for TizenSystemIndicator landscape
[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.
[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).