[SPARK-2403] Catch all errors during serialization in DAGScheduler

https://issues.apache.org/jira/browse/SPARK-2403

Spark hangs for us whenever we forget to register a class with Kryo. This should be a simple fix for that. But let me know if you have a better suggestion.

I did not write a new test for this. It would be pretty complicated and I'm not sure it's worthwhile for such a simple change. Let me know if you disagree.
Please catch [NonFatal(e)](http://www.scala-lang.org/files/archive/nightly/docs/library/index.html#scala.util.control.NonFatal$) instead. I think we should catch StackOverflowError here (as that is a possible error during serialization), but we should not catch OOMs and other such throwables except to re-throw them.

NB: Despite what the documentation says, NonFatal does indeed seem to catch StackOverflowError:
```scala
scala> NonFatal(new StackOverflowError())
res1: Boolean = true

scala> NonFatal(new OutOfMemoryError())
res2: Boolean = false
```