SafeDiffuser: Safe Planning with Diffusion Probabilistic Models