redirector: migrate sql interface to sqlalchemy

* Replace run_sql queries with SQLAchemy query.

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>
```python
if not update_on_duplicate or \
    Goto.query.filter_by(label=label).exists():
```