Optimize some compiler/CFileUtl.pas functions for returning unchanged strings.
[ff.patch](/uploads/5dd540c0663a2cce8bdda698afa15e19/ff.patch)
Random refactoring that slightly reduces code size (−40 lines and −ε binary), slightly improves its speed (3/6000 on my application, 1/10,000 on the compiler), and, most importantly, makes use of `ansistring`’s copy-on-write.
`FixFileName`: when compiling my application, **all** (31K) calls are effective no-ops, and when compiling the compiler, **all** (4.7K) **but one** (that changes `'x86/cx86innr.inc'` to `'x86\cx86innr.inc'`). Input string often (65~95%) contains file separators, but they are almost always already equal to `source_info.dirsep`, so `FixFileName[i]:=source_info.dirsep` becomes a wasteful `UniqueString`. Running time on the compiler reduces by 0.3 ms and on my application by 2 ms.
`FixPath` gets an empty string 50% of the time, but out of nonempty ones, 99.5% are unchanged, both on my application and on the compiler. This saves 0.15 ms.
`TargetFixFileName/TargetFixPath` are not called a single time on my setup, but it’s unlikely I broke them either, and they share code with `FixFileName/FixPath` now.
`Upper/Lower(ansistring)`: I have complicated them, but for the purpose of saving many `UniqueString` calls and making these functions return references to unchanged strings instead of copies, which happens 85~95% of the time with `Lower` (−0.2 ms) and 5% with `Upper` (−0.15 ms).
issue