Deal with flaky tests

This pull request introduces a retry mechanic to deal with the notoriously flaky selenium tests on travis, which frequently timeout