knowledge: API migration to SQLAlchemy

* Replaces run_sql queries with SQLAchemy query.

* Refactors module in order to move logic from api to model.

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>
Done:
`models.KnwKB.query.filter_by(name=kb_name).update({"name": new_name, "description": new_description})`