[Android] Implement the http authentication in xwalk default client.

  The implementation is to provide the http anthentication
funtions to support the authentication requirement of some
web site related to username and password, covering the
following:
1 Import and implement a general class of HttpAuthDatabase
  to support common http authentication database interfaces.
  This class imports the android sqlite database to handle
  the username and password data on demand.
2 In default xwalk client, implement the method of
  setHttpAuthUsernamePassword() by calling the related method
  of HttpAuthenDatabase instance to set the username and password.
3 In default xwalk client, implement the method of
  getHttpAuthUsernamePassword() by calling the related method
  of HttpAuthenDatabase instance to query the username and password.

BUG=#784, #787
[Android] Create the XWalkRenderViewExt object.

XWalkRenderViewExt is a class that handles several IPCs from the class
XWalkRenderViewHostExt. To make it work, an object of XWalkRenderViewExt
must be created first.
[Android] Fix incorrect res ids for apps using cordova xwalk

Cordova xwalk container is using xwalk core library as an
Android library project.
For Android library project, it will generate the R.java for
it when building the project depends on it (Let's call it app
project). But the R.class will be excluded when generating
classes.jar. Then the resources within both app and library will
be put together to generate R.java for both app and library
package, it is to make sure the ids for them will not be conflicted.

Meanwhile, the dependencies for android java target in gyp system
is not the same. It breaks down the ant tasks and customized them
in very complicated way, each java src target which contains resources
will produce an R.txt which has allocated ids in it. The project
depends on it will generate R.java based on that to avoid conflicts.

The two things can't work together, but the command line interface
cordova container provides to developer should not be changed.

The solution is here,
Take all resources within xwalk core library as resrouces for library.
An R.java will generated at code-gen step for them. This patch will
overwrite the pre-compile step between code-gen and compile.
The step will copy R.java for core library to package
org.chromium.content and org.chromium.ui, as well as replace the
determined id values in it with the references to org.xwalk.core.R.

BUG=https://github.com/crosswalk-project/crosswalk/issues/862
[Android] Return the correct context for external extensions

The previous implementation returns the context of runtime side which is
a context for library package. This is true for internal extensions. However,
for external extensions, the context should be the same as the activity
because they're inside of runtime client. This is to fix the issue to return
the activity as the context for external extensions.

BUG=#777
[Android] Add one interface to set whether to load external extensions.

For some usage scenarios, external extensions are not needed
because it has its own plugin or extension mechanism. Hence here a new
method is used to enable/disable the mechanism to load external extensions.

BUG=#948
[Android] Define the class XWalkRuntimeViewProvider as an interface.

It's an abstract class and some shared implementations are included
and will be used by inherited classes. However, xwalk core library needs
an interface which will be implemented by the container.
To meet this requirement, split this class into two: one interface containing
all methods and the base class to contain some shared implementations like
managing extensions.
[Android] Integrate xpk support in packaging tools.

xpk is the format of application package,
which is managed by xwalk runtime.
It should be the default input of packaging tools.
The format of xpk is defined here:
https://github.com/crosswalk-project/crosswalk-website/wiki/Crosswalk-package-management.

Usage: "python make_apk.py --xpk=the/path/to/xpk/file"

BUG=https://github.com/crosswalk-project/crosswalk/issues/738
Bump version to 2.31.22.0
Merge pull request #922 from wang16/core_library_res

[Android] Fix incorrect res ids for apps using cordova xwalk
Merge pull request #952 from gaochun/XWalkRenderViewExt

[Android] Create the XWalkRenderViewExt object.
Merge pull request #954 from yongsheng/errorcontext

[Android] Return the correct context for external extensions
Merge pull request #949 from yongsheng/948

[Android] Add one interface to set whether to load external extensions.
Merge pull request #908 from yongsheng/refactor

[Android] Define the class XWalkRuntimeViewProvider as an interface.
[Android] Implement setNetworkAvailable method in XWalkView

The setNetworkAvailable method allows XWalkView embedder to trigger
window.online/offline event and set navigator.onLine property on JS side when
the network connection is up or down. This fix is to implement this method by
adding a render process observer on native side to watch the network availability
change notification from browser process. At present, it is only used by Android
port.

BUG=https://github.com/crosswalk-project/crosswalk/issues/880
TEST=org.xwalk.core.xwview.test.SetNetworkAvailableTest
Merge pull request #902 from junmin-zhu/xpk

[Android] Integrate xpk support in packaging tools.
Merge pull request #794 from ShDavidliu/viewMethods

[Android] Implement the http authentication in xwalk default client.
Merge pull request #895 from hmin/online-event

[Android] Implement setNetworkAvailable method in XWalkView
[Extensions] Add SetExtraJSEntryPoints to Extension C API

This will allow for Extension to inform if they have other entry
points (apart from the implicit extension_name), that should cause
the extension to be loaded.

For example, let's start with an extension named 'xwalk.sample' that,
for whatever reason, needs to have a function in the 'xwalk' object,
let's say 'xwalk.SomeFunction'. The extension would need to use this
API to tell that it should also be loaded when 'xwalk.SomeFunction' is
accessed, if we want our load on demand functionality to work.

An additional internal API header is introduced to keep this new API
contained, until this idea is proven.
[Extensions] Verify that the entry points are valid names

Also make sure that there aren't any extension already registered
with clashing names (or entry points).

We re-use the function that used to validate extension names to validate
entry points as well, so we rename it to something more appropriate.

All the symbols "exported" by an extension are kept on a std::set, so we
can re-use this Set when testing the extension name.
[Extensions] Add tests for conflicts between extensions

This adds for when an extension adds an entry point for an object
that belongs to another extension, either the extension name or
via entry points.