Initial work towards log -> event stream conversion.

SortedEventBuffer was mostly written as an exercise. Need to profile it
eventually to find out if it's worth the complexity over a simple
insertion-sorted buffer.

I considered using LogParser to handle the log files but it's quite a
heavyweight dependency.