XD-542 Rework

Add DeploymentMetadata (based on @tekul DeploymentInfo)

Module constructor now takes a ModuleDefinition and DeploymentMetadata.