Break cached stats migrations into dedicated generator

This allows existing implementations to add new migrations via a dedicated generator, making for a smooth upgrade path.