Control of spin diffusion and suppression of the Hanle oscillation by the coexistence of spin and valley Hall effects in Dirac materials