redirector: migrate sql interface to sqlalchemy

* Replaces run_sql queries with SQLAchemy query.

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>
redirector: module enhancement

* Refactors module in order to move logic from api to model.

* Creates new registry for redirect methods.

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>