atomic write of state
Added loop to continue reading from rotated file at start up
(before starting to monitor the file).
Synchronized cancelling of flush thread.
allow tuning the max processing time
Added select_re, exclude_re to filter lines.
Added multiline_invert to invert the effect of multiline_re (lines that
don't match multiline_re are continuation lines).
Precompile regular expressions for performance.