Internal helper. Asserts that x carries the doseprop_stats class,
contains the per-metric stats columns, and carries the attributes
downstream consumers (notably plot_build_doseprop()) depend on. Aborts
with a clear message on failure; returns x invisibly on success.
