[Flang][runtime] Fix RENAME intrinsic, remove trailing blanks (#159123)
The RENAME intrinsic did not correctly remove trailing spaces from
filenames. This PR introduces code to remove trailing blanks as
documented by GFortran.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>