travis: Implement command retries

This is an attempt at ignoring some of the rather common network issues, as
described on the Travis blog.