Error Prone: Enable and fix SynchronizeOnNonFinalField

The one instance in StreamEvents was not an actual bug, but honestly
it's pretty hard to follow and I could be wrong. The final
CancelableRunnable instance was instantiated along with the
StreamEvents, and if it ever actually called writeEvents, it would be
synchronizing on the wrong stdout instance. Looking a little closer, it
shouldn't be possible to call run() until after the runnable is
submitted to some executor, which only happens after initializing
stdout. Plus, stdout can only ever be the one instance or else null, so
this would have resulted in NPE if it ever happened in practice.

The new implementation makes both writer and stdout effectively final
variables at the time start is called, and passes them through as
arguments. This is still not especially easy to follow, but at least
Error Prone is able to help us out by running this analysis.

Change-Id: Ie9ba5d16e328aca5fcfb2c69b9ba5d4776ea095e
diff --git a/tools/BUILD b/tools/BUILD
index ceb5c3d..65ac23d 100644
--- a/tools/BUILD
+++ b/tools/BUILD
@@ -91,7 +91,7 @@
         "-Xep:SimpleDateFormatConstant:ERROR",
         "-Xep:StaticGuardedByInstance:ERROR",
         "-Xep:StringEquality:ERROR",
-        #"-Xep:SynchronizeOnNonFinalField:ERROR",
+        "-Xep:SynchronizeOnNonFinalField:ERROR",
         "-Xep:TruthConstantAsserts:ERROR",
         "-Xep:TypeParameterShadowing:ERROR",
         "-Xep:TypeParameterUnusedInFormals:ERROR",