Refactor summary stats into runtime internal stats and client-facing summary stats objects,
and add better handling for missing values and feature scaling.