add some type/migration consts to protocol.go, add migration functionality for domains, workflows, types