knowledge: Rest API

* Implements a first prototype of Rest API to deprecate
  old kb export. (addresses #2570)

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>
It would be probably nicer to move most of the code around `query` to model class method and keep just:
```python
return [kbv.to_dict() for kbv in KnwKBRVAL.query_mappings(...).all()]
```

so in REST API you can call:
```
RestfulSQLAlchemyPagination(KnwKBRVAL.query_mappings(...), page=1, per_page=10)
```