Add unapply() to CompilationFailure and TestEvent

This requires handcoding the formatter since Json.format gets
confused by custom unapply.

unapply() takes an Event
Let scalariform reformat protocol/package.scala

Every time I touch this file it makes a mess, so let's just
get this out of the way.