Reorg to split internal API from implementation
Added massive hack to allow stopping and starting a running workflow,
allowing full support for the basic state model.