better connection error handling

PR to resolve mailgun/mailgun-ruby#8