Stop filterworker and outputworker from crashing

When an exception is thrown during event processing, logstash may stop accepting data or crash altogether (cf. LOGSTASH-1353, LOGSTASH-1440 or LOGSTASH-1872).

I have commited two changes that make logstash continue working after encountering an exception. To test the patches, you can use the following configs.

For the filterworker case:
```
input {
  generator {
    lines => [
      "A%C3O",
      "foobar"
    ]
    count => 1
  }
}
filter {
  urldecode { }
  kv { }
}
output {
  stdout { }
}
```

For the outputworker case:
```
input {
  generator {
    lines => [
      "A%C3O",
      "foobar"
    ]
    count => 1
  }
}
filter {
  urldecode { }
}
output {
  stdout { codec => json {} }
}
```

Please consider including these patches in the next release. Thanks.