knowledge: REST API addition

* Implements a first prototype of REST API to deprecate
  old kb export. (addresses #2570)

* Adds a testsuite for REST API

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