rest: factorize resource_class
rest: factorize resource_class

This simplifies a bit the code by using the Resource attribute where
it's needed directly in the REST controller class.

Change-Id: I10ef3912caeed405035c7ad1d7d4cc0b8ddfba7e

gnocchixyz/gnocchi,idegtiarov/gnocchi-rep,sileht/gnocchi,idegtiarov/gnocchi-rep,idegtiarov/gnocchi-rep,leandroreox/gnocchi,leandroreox/gnocchi,gnocchixyz/gnocchi,sileht/gnocchi