restapi: Don't assume that Lists are ArrayLists

Currently there are a few places where we assume that the result
returned by the backend is an ArrayList. This isn't necessary true, in
particular it isn't true for lists of users and groups returned by
directories, as they will be special empty lists. This patch changes the
RESTAPI so that it uses the List interface instead of the ArrayList
class.

Change-Id: Iff2d2a7b558f111312b6299ce7ed95993deb68ca
Bug-Url: https://bugzilla.redhat.com/1073359
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>