Statistical Decomposition and Machine Learning to Clean In-Situ Spaceflight Magnetic Field Measurements