WIP alerts: port to Flask/SQLAlchemy

@kasioumis can you have a look and help us with porting the alerts engine?

--
addresses #2611
cc @hachreak for forms (depends on autocompletion field from #2615)
@hachreak we can change it to `_('Day')` here.