Statistics for Hilbert Complexes: Analysis, Applications, and Discretizations