Unit test: secure connection check becomes async.

Issue #10882: https://github.com/ariya/phantomjs/issues/10882
Unit tests: reduce the flakiness of loading progress tests.

For whatever reason, swapping the order with the render() tests solve the
intermittent random failures. Also, split the tests between loading
start and finish checks (to better recognize which one is failing, if
there is a failure), also make the tests more asynchoronous.

https://github.com/ariya/phantomjs/issues/11091