restul: fix for testing accesstoken

* Refactors code in RestValidator

Signed-off-by: Konstantinos Kostis <konstantinos.kostis@cern.ch>
tags: REST API and testing

* Addition of a test

* Refactors code of restful api

Signed-off-by: Konstantinos Kostis <konstantinos.kostis@cern.ch>
tags: REST API and testing

* Adds test to retrieve all tags of
  a user.

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