Theoretical analysis of two-stage fission gas release processes: grain lattice and grain boundary diffusion