Refactor total_resources

Make the implementation slightly faster and more robust:

- Check that res.nested is callable
- Don't call res.nested() more than once
- Check for None explicitly
- Calculate totals directly, rather than with a for loop

Change-Id: Ib43cf5555620e54b9d4634e40cf46f75b50782ac
Get InstanceGroup InstanceList from get_instances()

Change-Id: I477aeede396e247134c838663fe7d54941758cd0
Don't iterate over Stack.resources dictionary

Now that parser.Stack is a proper Mapping, we can iterate over its
keys/values/items directly instead of accessing the resources attribute.

Change-Id: I6bd9f357c21a0e75623a71543e981d3f4f87fcbe
Implement parser.Stack.__delitem__()

Allow the update code to delete old resources from the stack without
accessing the stack's resource attribute.

Change-Id: I9dbc623d7396dd84cdbee992fa91d88b6c01a0e5
Merge "Refactor total_resources"
Merge "Get InstanceGroup InstanceList from get_instances()"
Merge "Don't iterate over Stack.resources dictionary"
Merge "Implement parser.Stack.__delitem__()"