Parametric inference for discrete observations of diffusions with random effects in the drift or in the diffusion coefficient