[Android] Destroy the native resource of XWalkView

Each XWalkContnet object owned by XWalkView has its own native counterpart, we
need to cleanup the native resource when an XWalkContent object is requested to
be destroyed, e.g. an activity is destroyed.

This fix is to add 'destroy' method to XWalkContent for this purpose.

BUG=https://github.com/crosswalk-project/crosswalk/issues/998
[Android] Add loadAssetFileAndWaitForTitle and apply in XWalkCoreTest cases

Instrumentation tests may fail because the titles may be verified
before they are changed. This commit introduced a new interface named
"loadAssetFileAndWaitForTitle" to wait until the title be changed.

BUG=#984 (Partially)
[Android] Refactor the code for instrumentation tests.

Currently so many source codes are duplicated and hard to maintain.
Need to refactor them and share common code. This fix is to share
all common code in utils so that instrumentation tests for embedded
and shared modes can share as many code as possible.
This is the second step. The next one is to share the code for core
tests.

BUG=https://crosswalk-project.org/jira/browse/XWALK-95
Merge pull request #1044 from junmin-zhu/manifest

[Android] Use loadAppFromManifest if a manifest.json is used for a web app
Merge pull request #1037 from DonnaWuDongxia/waitForTitle

[Android] Add loadAssetFileAndWaitForTitle and apply in XWalkCoreTest cases
Merge pull request #1050 from hmin/destroy-xwalkview

[Android] Destroy the native resource of XWalkContent
Merge pull request #1054 from yongsheng/refactorcodetest

[Android] Refactor the code for instrumentation tests.
[Android] Add thread safety checking for XWalkView.

All XWalkView methods must be called on the UI thread.
Throw an exception when XWalkView methods are called from
other thread. So all unit test cases need to be refined for
this change.

BUG=https://crosswalk-project.org/jira/browse/XWALK-98