redirector: migrate sql interface to sqlalchemy

* Replace run_sql queries with SQLAchemy query.

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>
33: D203 Expected 1 blank line *before* class docstring, found 0
33: D204 Expected 1 blank line *after* class docstring, found 0
46: D102 Docstring missing
53: D102 Docstring missing
57: D102 Docstring missing
60: D290 White spaces around docstring should be trimmed.