restapi: cast list results to single entity

In change 88756e3 (core: Remove usage of dynamic queries from the
Backend) the dynamic queries were removed from the restapi Backend.
The change didn't take in account that some of the queries were
used to retrieve only one item and therefore doGetEntity should
handle the case (as the old deprecated getEntity method).

An example of the problem was adding a cluster:

 # add cluster --data_center-name DataCenter1 --name Cluster1

failing with a java.lang.ClassCastException (Cannot cast ArrayList
to StoragePool).

Change-Id: I7e96a62cd7a5429a5102c7a9134bee8754b3d128
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>