resource_get_all_by_stack returns a dict

This changes the returned results of resource_get_all_by_stack
to be a dict keyed by name, instead of a list of resources.

There appear to be zero uses of resource_get_all_by_stack so this
should have no effect on existing code, but it will be a more useful
form to consume the resources in a stack.

This change also prefetches resource data, as for
resource_get_by_name_and_stack

Change-Id: I1cc0ea7cf4852cc2407b3ada9ede7b5f6d1cc682