Dirac fermions and superconductivity in the two-dimensional transition metals MOH (M=Zr, Hf)