Fix CI config: Wait for device online and wrapper download [skip ci]

Add `adb wait-for-device` to before_install stage to avoid error code 137.
Add `./gradlew --version` to before_install stage to avoid error code 137.

CI server kills jobs and shows the mysterious and random error code 137.
Change the configuration helps to avoid some manifestations of this general error.
It's possible that the issue is about concurrency.

This fix forces 'gradle download' before other expensive tasks (create/start emulator).

wait-for-emulator.sh fails and shows "device not found" and builds are not reproducible.
Other times build fails due error code 137.

This fix solve the issue waiting for device online (connected state) before run it:

If there is an error waiting for device online, we don't need continue the build
and the build will fail after ten minutes of inactivity (CI server kills it) but
this should not happen never.

Otherwise we improve reproducible builds, we can add tasks as download dependencies
or prepare project before run the script, avoid the error code 137 and improve timing
info.

There are alternative solutions to avoid "device not found" error as increase
`failcounter` to 30 but seems a worse solution and the error code 137 remains.