Implement Stack loading from DB as a separate function

Separate out the lookup of a stack in the DB from the actual creation from
an existing DB representation.

Change-Id: I709fb7c4059229371ba85a2cd6e87ec5361a5400
Merge "Implement Stack loading from DB as a separate function"