tags: REST API

* Refactors code of restful api

Signed-off-by: Konstantinos Kostis <konstantinos.kostis@cern.ch>
restful: refactors restful utilities

* Imports the db to the methods needed

Signed-off-by: Konstantinos Kostis <konstantinos.kostis@cern.ch>
restful: testing of tags restful api

* refactors code

Signed-off-by: Konstantinos Kostis <konstantinos.kostis@cern.ch>