SE(3)-DiffusionFields: Learning smooth cost functions for joint grasp and motion optimization through diffusion