The two-sample problem in Rm and measure-valued martingales