Add nested_depth column to stack table

Adds a new nested_depth column, with a migration which traverses the
tree via owner_id for existing stacks and populates the appropriate depth.

This is a static, create-time depth, which should be sufficient for our
usage since nested stacks can never be moved within the tree.

The reason for this change is to allow depth validation (e.g enforcing
max_nested_stack_depth) when creating nested stacks via RPC calls,
without incurring the cost of loading every parent stack in the tree
to count the depth.  It may also allow some future optimisations of
some of the recently added API calls which do recursive introspection
considering a nested_depth parameter.

This is a step towards decoupling nested stacks from the current
usage of parent_resource and associated runtime introspection of the
parent stack, and as such the current StackResource is modified to
use the new scheme (required so post-migration we don't end up with
invalid nested_depth data in the DB).

Change-Id: I727651ff738ae668a3f21b374fc7a1b48f6e4777
blueprint: decouple-nested
engine service add nested_depth to create_stack

Adds nested_depth as an optional argument to the top-level interface
for handling stack-creates, so it will be possible to specify the
depth when creating a nested stack via an RPC call between engines.

Change-Id: Idc24d1e55810b10615d764b94f7c708673516295
blueprint: decouple-nested
Add nested_depth to internal _create_stack RPC interface

Adds a nested_depth parameter, which can be used to set the correct
nested_depth value when creating nested stack via RPC calls between
engines.

Change-Id: I71538a4297168a08a1aaaf3d23f42f3878f6cf0e
blueprint: decouple-nested
Merge "Add nested_depth column to stack table"
Merge "engine service add nested_depth to create_stack"
Merge "Add nested_depth to internal _create_stack RPC interface"