Determination of diffusion coefficients of mercury atoms in various gases from longitudinal spin relaxation in magnetic gradients