Clean up script commands in .travis.yml.

Besides general whitespace and quoting cleanup, commands that test
variables were changed from:
  [ $B = a ] && command || true
to
  if [ $B = a ] ; then command ; fi
This form correctly returns the exit code of "command".
Add "travis_retry" to commands that download from external servers.

This helps reduce the chance of a build failure due to transient
download error.