[libc][cmake] Collapse extra blank lines in cmake_format (#240295)
Updated cmake_format.py to collapse consecutive blank lines to a single
blank line and strip leading blank lines at the start of files. Applied
the updated formatter across libc CMake files.
Assisted-by: Automated tooling, human reviewed.