RestoreGrad: Signal Restoration Using Conditional Denoising Diffusion Models with Jointly Learned Prior