The original implementation used complex nested loops to merge
configuration file lists from different directories. This commit
simplifies the code by introducing a new config_merge_list()
function that handles the merging logic.
Changes:
- Add config_merge_list() to merge lists with duplicate detection
- Add config_cmp() comparison function using strcoll() (consistent
with alphasort() behavior from scandirat())
- Add configs_add_filename() helper to reduce code duplication
- Simplify ul_configs_file_list() by replacing ~120 lines of
merging logic with 3 calls to config_merge_list()
- Remove intermediate etc_run_file_list, merge directly to output
- Update read_dir() to return 0/-ENOMEM instead of entry count
- Use list_count_entries() to get final count
The new config_merge_list() moves entries directly from source
lists to the destination list without extra allocations, making
it more efficient than the previous approach.