Diffusion Models: A Comprehensive Survey of Methods and Applications