Density dependence of positron annihilation and positronium formation in H2 gas at temperatures between 77 and 297 K