Add a new db api stack_get_all_by_owner_id

This is to get the next level of child stacks.

Partial-Bug: #1234010
Change-Id: I64b30b4040bc443b64d23d85a054010da4dd1130
Start the watcher task if a nested stack has watches

Even if the parent stack has no watches.

Change-Id: I06322f908fdbd474778776749cb3e1634183ed23
Partial-Bug: #1234010
Make sure that nested stacks have their watch rules checked

Change-Id: Iee9629739e9549e33f8ed8c4ca08098a7e4d0acf
Closes-Bug: #1234010
Update resource stacks automatically

When moving resources between stacks during an update, update the
resource's stack pointer automatically when adding it to its new stack.

Change-Id: I92666589fe417f5d905104d5a0890650da70e825
Fix clashing loop variables in TemplateResource

There were two loops using "v" as a variable name.

Closes-bug: #1235077
Change-Id: I5198621ce724abe9638da4a7482ae6817bbd86e7
Merge "Update resource stacks automatically"
Merge "Fix clashing loop variables in TemplateResource"
Merge "Add a new db api stack_get_all_by_owner_id"
Merge "Start the watcher task if a nested stack has watches"
Merge "Make sure that nested stacks have their watch rules checked"