Fix review comments

 - use `ModuleType` and `DeploymentUnitStatus.State` in ModuleMetadata model
 - fix javadoc