[libc] Add program_invocation(_short)_name and tweak err.h functions (#212448)

These GNU extensions hold the name of the program as invoked (argv[0])
and its short name (the basename after the last slash).

Both variables are initialized in the startup code. As with all of our
other variables, they are only available in full build mode.

The trickiest part of this patch are the error reporting functions from
<err.h>, which access this variable, and they are currently enabled in
overlay mode. To make them work, I add an #ifdef to select the right
version. I considered doing something more elaborate, like we have with
`errno`, but that seemed too heavy for a single occurrence.

I also drop the linux check in this function. The documentation says the
functions should print the "last component of the program name", which
"llvmlibc" is not. If someone wants to enable these functions on
non-linux, they can figure out what they want to print here and how.

Assisted by Gemini.

GitOrigin-RevId: 8f53e523b92ccdc5074acc02c1c103149c20530a
16 files changed