Direct molecular dynamics and density-functional theoretical study of the electrochemical hydrogen oxidation reaction and underpotential deposition of H on Pt(111)