Time-dependent diffusion of Cosmic Rays from discrete sources: I- Method and analytical solutions