Method scanAlerts was called inside a loop over the interfaces in minute.lua.
Since scanAlerts was looping over the interfaces as well, this was causing
interfaces to be deselected from the outer loop.
This commit fixes the issues by forcing scanAlerts to receive an input interface.
Fixes#582
Interface flows are now stored using integer interface ids rather
than interface names. This speeds up queries.
A migration code has also been introduced so that old MySQL table
format is migrated and old data does not get lost.
This also fixes#460