Density-functional studies of the adsorption and reaction of HCl and H2O molecules over the W(1 1 1) surface