Prefetch data in resource_get_by_name_and_stack

This loads resource and resource data in a single query, which means
one less sql query per stack resource in a call to describe_stack_resource.

Change-Id: Ic2e1ab68cf651f290be75206fd5c0c841de4ef82
Related-Bug: #1306743
Merge "Prefetch data in resource_get_by_name_and_stack"