Provide config option to limit resources per stack

This provides an upper bounds on the number of resources a root level
stack can contain. The limitation is only applied to the engine creation
point so that existing stacks that are over the limit in the database
will not cause problems. Nested stacks will be addressed in a follow-up
patch.

Partial-Bug: #1215100
Change-Id: I1adcb22cf9bd5750b4ae3f219dd3264d1d02c1fc
Limit resources per stack in nested stacks

In an earlier patch, the root stack creation was limited by the
max_resources_per_stack config setting. Now we need to apply the same
limit for nested stacks.

Change-Id: I2f871a5d5f4c51dd9cd7c93e94f8b0c8d87fa069
Partial-Bug: #1215100
Merge "Provide config option to limit resources per stack"
Merge "Limit resources per stack in nested stacks"