[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.
[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
[Application] Move Extraction logic inside Package class

Simplify the code by putting the Package extraction logic inside the
Package Class.
Remove Extractor.h|cc
Rename extractor_unittest.cc to package_unittest.cc
[Application] Remove unnecessary constructors

Remove unnecesary constructors. We are always creating new objects
passing the path. So constructor that takes ScopedStdioHandle is not needed.
Remove default constructors
[Application] Fix unit tests

Fix for the package unit tests
[Application] Add Application Management tool

This tool provides a way to list, install and uninstall Applications
using the D-Bus API that will be provided by Crosswalk when it is run
using the run-as-service switch.

Fow now, only listing installed applications is tested. When Crosswalk
implements the install/uninstall functionality, there should be little
to no changes to this tool. But the code is included so the aim of
this tool is made clear.
REGRESSION(cc5d7e7): Make the default "gbs build" case work again.

Hopefully this is the last regression for the time being. We cannot pass
--generator-output=. to gyp because its make generator does not work as
expected in that case and writes "srcdir =" instead of "srcdir = ." in the
Makefile.

We now only pass --depth and --generator-output if the BUILDDIR_NAME macro
has been set. One can still pass "--define BUILDDIR_NAME
/home/abuild/rpmbuild/BUILD/crosswalk/src" and break things, but let's say
this is an extreme corner case.

BUG=https://crosswalk-project.org/jira/browse/XWALK-532
SecurityService: add permission service class

* This class is used to receive API Contrlo from extension.
  It queries permissions from DB and tell the result to extension.
[Extensions] Add API for CheckAPIAccessControl

This API is for extension developer. The API need to be called in the
implementation of each exported API in C or C++ code.
SecurityService: remove permission service class
Extensions: remove interface of appliation permission

* using static interface CheckAPIAccessControl from
  ApplicationPermissionService to ApplicationService
* do code lint for style checking