Leveraging Catastrophic Forgetting to Develop Safe Diffusion Models against Malicious Finetuning