Differential equations and dispersion relations for Feynman amplitudes. The two-loop massive sunrise and the kite integral