First-principles calculations of hydrogen solution and diffusion in tungsten: Temperature and defect-trapping effects