### Environment

* Dubbo version: 3.2.0
* Operating System version: macos10.15.7
* Java version: 1.8

### Steps to reproduce this issue

使用各种方式导致Module启动失败。

### Expected Behavior

Module启动失败，不暴露MetadataService。

即不执行DefaultApplicationDeployer#prepareApplicationInstance。

### Actual Behavior

由于org.apache.dubbo.config.deploy.DefaultModuleDeployer#onModuleFailed传入错误的状态STARTED，导致执行DefaultApplicationDeployer#prepareApplicationInstance。

```java
private void onModuleFailed(String msg, Throwable ex) {
    try {
        setFailed(ex);
        logger.error(CONFIG_FAILED_START_MODEL, "", "", "Model start failed: " + msg, ex);
        applicationDeployer.notifyModuleChanged(moduleModel, DeployState.STARTED);
    } finally {
        completeStartFuture(false);
    }
}
```


try {
            ModuleServiceRepository serviceRepository = moduleModel.getServiceRepository();
            List<ProviderModel> exportedServices = serviceRepository.getExportedServices();
            for (ProviderModel exportedService : exportedServices) {
                List<ProviderModel.RegisterStatedURL> statedUrls = exportedService.getStatedUrl();
                for (ProviderModel.RegisterStatedURL statedURL : statedUrls) {
                    if (statedURL.isRegistered()) {
                        doOffline(statedURL);
                    }
                }
            }
        } catch (Throwable t) {
            logger.error(LoggerCodeConstants.INTERNAL_ERROR, "", "", "Exceptions occurred when unregister services.", t);
        }
    }
    private void doOffline(ProviderModel.RegisterStatedURL statedURL) {
        RegistryFactory registryFactory =
            statedURL.getRegistryUrl().getOrDefaultApplicationModel().getExtensionLoader(RegistryFactory.class).getAdaptiveExtension();
        Registry registry = registryFactory.getRegistry(statedURL.getRegistryUrl());
        registry.unregister(statedURL.getProviderUrl());
        statedURL.setRegistered(false);
    }
    @Override
    public synchronized void postDestroy() throws IllegalStateException {
        if (isStopped()) {
            return;
        }
        unexportServices();
        unreferServices();
        ModuleServiceRepository serviceRepository = moduleModel.getServiceRepository();