[Runtime] Polish application browser test

1. Add a new xwalk.app.test.notifyTimeout API to notify test timeout.

2. Make test API extension running on UI thread. And let the client to return
the xwalk.app.test.notifyPass/Fail/Timeout callback explicitly when it's ready.

3. Using Promise to provide a common asynchronous test driver. The JS can now
write code like below to test:
  function test1(resolve) { ... } // calls resolve() when test is done
  function test2(resolve) { ... } // calls resolve() when test is done
  var tests = [test1, test2];
  xwalk.app.test.runTests(tests, 5000); // if all tests can't finish in 5
  seconds then a TIMEOUT notification will be sent.
Merge pull request #1340 from seanlong/event_router

[Runtime] Polish application browser test