Better error handling for loggly output

Looks like this https://github.com/elasticsearch/logstash/pull/987 didn't make it through the move to logstash-contrib.