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/1073486
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
(cherry picked from commit 975457b92d5b6f02d845c5410ae11d3d186a3635)
(cherry picked from commit a49cef416fe9638fd916d73cb896e442f4c9873c)