[Android] Exit with error code when the make apk test cases failed.

Because the trybot requests exit code for main page to check
whether PR passes the make apk test cases. Currently,
the make_apk_test.py only display the error info, but always exit
with 0 even if it failed. So the main page of trybot will always show
tests passed.

Add a function to check the make_apk_test.py's result, and exit
with correct code according to this result.
Merge pull request #1594 from junmin-zhu/trybot

[Android] Exit with error code when the make apk test cases failed.
[Android] Fix the issue onPageFinished callback would be called twice

The right behavior is onPageFinished callback of XWalkClient should only
be called one time when it completes to load the main frame, and won't
be called if loading a javascript: url. This commit removes a duplicated
invokation of onPageFinished, and also ports some tests for onPageFinished
callback from android_webview/.

BUG=https://crosswalk-project.org/jira/browse/XWALK-1017
TEST=org.xwalk.core.xwview.test.XWalkClientOnPageFinishedTest