when writing to a log file, use a .tmp filename
add rotation option for a seconds interval

This adds the ability to rotate logs more frequently, for cases where you want
to process the logs on a near real-time basis. A rotate_seconds option is added,
and if set, it will rotate the log every X seconds if there has been a packet
logged. That means you can time-limit how long an event will live in the active
log.

If rotate_seconds is set, all the other logging options are ignored.
Add an option for using the .tmp file when logging

Setting use_tmpfile in the options to true will make the module use a .tmp
file when writing to an xml logfile. The .tmp gets removed when the file
is rotated.