Address sweeper review feedback on #92637:
1. Chain os.path.normpath before os.path.normcase to also handle
trailing-slash and '..' duplicate shapes, not just casing.
2. Add unit tests for _merge_profile_tree covering case-insensitive
merge, trailing-slash dedup, id fallback, and declared-vs-auto
identity precedence.