SERVER-137589ClosedFixed
Make SBE $sum/$avg state available outside VM
This change makes double double summation state available outside of the VM. The state is stored on a struct. The struct provides read/write methods to transform to/from the SBE array state representation. This dedups some logic between $sum and $avg. This also unlocks future work that uses the struct directly without the SBE array.