Better travis ci config.

Lifted from https://github.com/codahale/metrics/blob/ca79f9bf26bcc2a0dde8373c3a3fb81f6bf20818/.travis.yml