Don't restart errored jobs if they are cancelled

This PR fixes travis-ci/travis-ci#2971 and also updates our AMQP library and adds Sentry support.