Add travis_retry to sudo apt-get install and pip install in .travis.yml (rebased onto develop)


This is the same as gh-2819 but rebased onto develop.

----

See also https://github.com/openmicroscopy/bioformats/pull/1223. This should hopefully minimize failures due to timeouts