Effect of ion energy on hydrogen diffusion in n- and p-GaAs