Further refactor GetEntitiesOutput

This patch also cleans up all other building of
results in our api modules other than those in
the search entities module (mainly GetEntities)

Change-Id: I0550f0b3cc65ce1be0fb4644bfcdee2ad9911959