Refactor Travis CI configuration to support other CI services.