import: Import notifications in a separate run
This means we're forced to run through the logfiles twice, but since
it *should* be a one-off thing (until we merge the report_data table
into the merlin database anyway), we might as well do it like this and
save ourselves the grief that comes with juggling two separate database
connections.
This also means all queries work as expected, and the notification
import can be quite easily tested by creating a dummy table that has
the same layout as the real notification table in the merlin database.
We also get the nice side-effect of index disabling/reenabling working
without any effort what so ever.
Since notifications are (usually) a lot fewer than the alert events
anyway, the import doesn't take all that long.
Signed-off-by: Andreas Ericsson <ae@op5.se>