[Refactor] composites: parameterise build helpers by generation
process_dependencies, build_inverted_index, mark_whitelist_dependencies,
collect_leaf_atoms, the composite-dep cbdata and the inverted-index
cbdata all take an explicit composites_generation reference now and
operate solely on it, with no implicit access to manager state.
The manager keeps a no-arg overload of each that forwards to
*current_gen — config-load wiring is unchanged.
This unblocks building a staging generation (under a dynamic-map
reload) without touching the live one. No behaviour change for static
configurations.