Two-loop master integrals for the leading QCD corrections to the Higgs coupling to a W pair and to the triple gauge couplings ZW W and γ∗W W