[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.
[Runtime] Rename xwalk.app API to xwalk.app.runtime

In order to align with Chrome runtime API naming
(https://developer.chrome.com/apps/runtime.html), we changed xwalk.app.* APIs to
xwalk.app.runtime.*.
[Runtime] Move application runtime extension from extension thread to UI thread

After PR #1080(https://github.com/crosswalk-project/crosswalk/pull/1080) we can
run application extensions on UI thread now.

The internal application extension code used to run on extension thread while
most of the application service code runs on UI thread. This means now we don't
need to post task to UI thread and get its result back in extension thread back
and forth anymore. This will make the code more clean and straight forward.
[Application] Add a way to observe ApplicationService activity

Add an Observer interface for ApplicationService, so that other code can
be notified when applications were added or removed.

This will be useful when exposing D-Bus interface on Linux because we
keep an D-Bus object for each application installed.
[Application][Linux] Expose installed apps via D-Bus

This commit exposes the '/installed' object path, that allow D-Bus
clients to List, Install and Uninstall applications. The D-Bus
interfaces are described in the implementation files.

InstalledApplicationsRoot is the entry point, and hold a corresponding
D-Bus object. It also hold a vector of child objects, which themselves
have their own D-Bus objects.

The org.freedesktop.DBus.ObjectManager interface implementation is
partial but enough for our current functionality.
[Android] Fix XWalk crash issue when call onDestroy.

The root cause is that destructor function was repeatedly executed.
In the destructor function of XWalkExtensionAndroid, call the
XWalkBrowserMainParts::UnregisterExtension, it erases the extension
and deletes it, then reentry the destructor function.

The fix is to move the unregister enxtension to DestroyExtension.

BUG=https://crosswalk-project.org/jira/browse/XWALK-352
[Android] Change the file format from dos to unix.

Several files are dos format. It means that it uses CRLF as the line
terminator. All files should use unix format. Change all these files
into unix format.
Merge pull request #1144 from wuhengzhi/onDestroy

[Android] Fix XWalk crash issue when call onDestroy.
Merge pull request #1194 from yongsheng/fileformat

[Android] Change the file format from dos to unix.
[Android] Improve the illegal character handler in packaging tool.

  When the application name includes the illegal character '.', the
packaging tool doesn't handle it and other illegal characters are
handled but no prompt. This fix is to improve the illegal character
handler in the packaging tool and the test case related to illegal
application name is added.

BUG=https://crosswalk-project.org/jira/browse/XWALK-139
REGRESSION(7b16c7d): Fix the %install stage on Tizen.

Due to the changes introduced in the commit mentioned above, we need to
change the default value we pass to the BUILDDIR_NAME spec file variable:
`out' is always added to the build directory anyway, so if one tried to
build a Tizen package in a fresh build directory the installation stage
would fail, as files such as the "xwalk" binary are now in
BUILDDIR_NAME/out/Release/xwalk instead of BUILDDIR_NAME/Release/xwalk.

Additionally, this also makes the default cause (ie. no BUILDDIR_NAME
specified) more consistent with the rest of the world, as we ended up
building in out/out/Release instead of just out/Release.

This wasn't caught by any bots because they all had old xwalk binaries lying
around in BUILDDIR_NAME/Release, generated before 7b16c7d went it, and
yesterday new canaries were not created because the build was broken due to
something else.
Merge pull request #1197 from rakuco/tizen-make-install-fix

REGRESSION(7b16c7d): Fix the %install stage on Tizen.
[Android] [REG] Re-enable remote debugging works

It is a regression introduced by 32 rebasing. The fix contains 2 major changes:
o Override the new method EnumTargets to list the inspectable targets
  for all valid web contents.
o Update the frontend url by using webkit revision instead of chrome
  version, like Android WebView does.

BUG=https://crosswalk-project.org/jira/browse/XWALK-456
[Application] Renaming XPKExtractor to Extractor

Extractor class will be used by all the package formats to
Extract / unzip the package to a temporary directory
Extractor unit test right now are checking only the xpk packages
Unit tests for .wgt packaged files will follow later
Extractor unit test should use with scoped_ptr
Rename SetupXPKExtractor to SetupExtractor
[Application] Add a base class Package.h|cc

The specific formats like xpk/wgt should inherit from
this base class. Package::Create() should create the specific
class depending on the file extension.
Generalize the Extractor, meaning Extractor class now has a
base class(Package) pointer.
change is_ok to is_valid
.get() is not needed
[Application] Inherit XPKPackage from Package

Refactoring Package related classes to a more generic approach.
VerifySignature() seems to be a better name than Validate() as the only
thing done in that function is verify the signature
[Application] Add a WGTPackage class inheriting from Package

Add a basic implementation of WGTPackage class
AFAIK there is no need for pre processing in the wgt package
like checking signature or header.
So we can directly proceed to parsing the xml
[Application] RefCounting Extractor is not necessary.

Since extractor is only called in application_service, we dont need
to use RefCountedThreadSafe. A simpler scoped_ptr suffices.
[Application] Check for both .xpk and .wgt files

Extractor::Create() and Pacakge::Create() are the callers where
we check for the file extension
[Application] Use only 1 factory method for Create()

Only Package::Create() method should be static. It should create the
appropriate derived class object. The derived class should not have any
factory method / static Create()
The base class constructor in (Package class) should be protected.
Remove unnecessary kXpkExtension