Allow EventWriter objects to be "closed", which causes them to discard their
output stream. Future writes to a closed EventWriter are silently ignored.
Add CStdFunction items for fork and execve.
Add runtime error UnsafeMultithreaded, for use when a program with multiple
threads calls a function that is unsafe in a multithreaded environment.
Print the offset of events when printing raw trace information.
Add specializations for EventType::TraceEnd to ThreadState's addEvent() and
removeEvent() methods, allowing the event to appear at any point in a trace's
event stream. This will be used in SeeC's handling of exec() functions.
Allow clients of TraceProcessListener and TraceThreadListener to control trace
writing.

Modify EventWriter to allow writing to be controlled by the following methods:
 - open() sets the output stream and enables event writing.
 - flush() flushes the output stream.
 - close() destroys the output stream and disables event writing.
When event writing is disabled, called to write() will return the value of
noOffset().

Modify ProcessListener to allow writing to be controlled by the following
methods:
 - traceEnabled() checks if writing is enabled.
 - traceWrite() causes process trace information to be written.
 - traceFlush() flushes the process data stream.
 - traceClose() closes the process data stream and disabled writing.
 - traceOpen() opens the process data stream and enables writing.

Add a flags parameter to OutputStreamAllocator's getProcessStream() and
getThreadStream() methods. This parameter is equivalent to the flags parameter
used with llvm::raw_fd_ostream, but will have F_Binary ORed to it.

Move TraceThreadListener::writeStateOverwritten() out of line.

TraceThreadListener::writeTrace() is replaced by traceWrite().

Modify TraceThreadListener to allow writing to be controlled by the following
methods:
 - traceEnabled() checks if writing is enabled.
 - traceWrite() causes the thread's trace information to be written.
 - traceFlush() flushes the thread's event stream.
 - traceClose() closes the thread's event stream and disables future writes.
 - traceOpen() opens the thread's event stream and enables future writes.

Streams that are kept open and written to incrementally are always opened with
F_Append, so that closing and reopening the stream will not affect the final
trace. This means the process data stream and each thread's event stream.

Streams that are written completely to finalise the trace are simply reopened
and rewritten completely each time traceWrite() is called.