Fixup assert_has_keys.

This test helper had awkward code that didn't support users in
debugging tests, as it didn't report enough information. Additionally
some style issues were present, which I fixed up at the same time.

Fix bug 1195239.

Change-Id: If07e54ae0f2db1152dfea2012ff39b0291955dd7
implement stack metadata

make metadata and delete/update policy accessible to stack resource

Blueprint stack-metadata

Change-Id: I2251b730ce7fb70b8b28f065479b9b6a7e8a1f33
engine : perform periodic tasks with stored stack_context

The metadata update needs to be performed with the stored stack_context,
not the admin_context, which contains no credentials to e.g authenticate
with nova

Fixes bug #1196618

Change-Id: I0451604535a731de5ad57d2d52cdf183e58cf7b0
Merge "implement stack metadata"
Merge "engine : perform periodic tasks with stored stack_context"
Merge "Fixup assert_has_keys."