Dual Diffusion for Unified Image Generation and Understanding