Modify stacks to take record/model instances instead of classes

This modifies stacks to take a record/model instance instead of
their class. The benefit of this is that the record used with the
stack can have data pre-set on it. This will allow stacks to work
with polymorphic associations because it will be possible to
set the type column for the association before the stack walks the
dependencies. This will also allow setting regular associations,
so custom records can be inserted into the stack as needed.