Integrate stacks with factories

This integrates stacks with factories. This allows using a factory
to build a stack, which takes advantage of all the attribute and
field setting logic of factories. This way a stack can be created,
but have it's attributes/fields defaulted or manually set the
same way they could be with a factory.