The One-And Two-Sample Problem For Data On Hilbert Manifolds With Applications To Shape Analysis