core, restapi: External provider helper

This patch introduces a helper class that will be used by the external
provider resource classes. This class contains a method that loads a
provider by id, needed in several places, and in order to implement it a
new query is also needed.

Change-Id: I6977b8acc361aadd2225af4613c44da34e3a3795
Related-To: https://bugzilla.redhat.com/1132259
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>