SQLAlchemy integration

http://docs.sqlalchemy.org/en/rel_0_9/orm/session.html#deleting-based-on-filter-criterion suggests this can just be `db.session.query(cls).filter(cls.ip == ip).filter(cls.timestamp < datetime.today() - timedelta(hours=1)).delete()`, which is a bit clearer and probably also one `DELETE` issued directly, rather than some `SELECT *` followed by a bunch of individual `DELETE`