Moved i18n to xlibrary, which is the right place.  Moved i18n refactoring tools to refactor package.
Added ungroup_keys_values/2/3 predicate, to use as a reversible group_pairs_by_key/2
No need to import library(sort)
Removed debug lines