An IO optimised method for accessing resource data

This provides a wrapper over the db_api.resource_data_* methods that
attempts to avoid unnecessary database calls for get operations.

On resource create, all resource data is loaded with a single query and
stored with the resource as a dict. Calling data_set() or data_delete()
clears this dict so the next time data() is called all resource
data is loaded again from the database.

There is a future potential optimisation to prefetch the resource.data on
resource_get_by_name_and_stack, which would result in zero resource data
queries for a Stack.load.

This is part of an effort to reduce the number of database queries required
for a Stack.load operation.

Change-Id: I2564a9f953841d895acd5b853a67aa4bc375b635
Related-Bug: #1306743
Merge "An IO optimised method for accessing resource data"