restapi: Don't use method names to infer types

Currently when we randomly populate objects in order to run tests, we
infer the types of objects contained in lists from the names of the
methods. For example, lets say that we have an object that has a
"getNics()" method that returns a list of "Nics" objects. We use the
word after the "get" prefix to infer the type. In this case we infer
that the type will be "Nics". But doing this has the dissadvantage that
we force ourselves to use method names (and thus tag names in the XML
representation) that match the type names. There was no reasonable
alternative in Java 6, but in Java 7 we can obtain the type of the
elements of the list directly. This is what we do in this patch.

Change-Id: Iadc9827c3885d7b9e39611b006a1b02eefa5c9f0
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>