This MR improves a few this in the Aggregation pass :
Use of add_prefix and internal_get_name_and_counter which should be avoided.
Scope data are stored in a map for faster lock up
Deduplication of all binder inside a module is changed by the deduplication of module binder before aggregating
The current pass works in two step: Ast_typed -> list of locally defined decl -> Ast_aggregated. The new pass work in one step : Ast_typed to Ast_aggregated (and a preprocessing before). Therefore all functions are direct mappers.
Expose function that doesn't take the local module as parameters.
Separate the deduplication in an independent self-pass for redability.
Homogenisation with the other pass
Side-effect : this change triggered a bug in the monomorphisation self-pass that is solved in the MR.