Cleanup of error handling in AbstractOutputWriter.

 If an error is detected in any of the threads then record the error so that subsequent calls of writeLine(String, Bundle) will propagate the error to exit the job. Converted the fields 'stopped' and 'exiting' from AtomicBooleans to volatiles because no test-and-set operations are performed on these variables.