indexer: allow to retrieve details on resources

When listing resources, it's now possible to have extra details. This is
useful when listing resources as generic and to then expand them to
their real types with all their attributes, without doing subsequent
queries.

Change-Id: Id05730cdbbd4256aa8ade4c5c42f732ae58be764