redirector: API migration to SQLAlchemy

* Replaces run_sql queries with SQLAchemy query.

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>
redirector: registry addition and refactoring

* 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>