lib/core: add a factory to `Set` to instantiate a `HashSet` by default