Support building with CC=clang

clang doesn't support -fno-strength-reduce (gcc doesn't either, these days, but
it silently ignores it). clang also doesn't support -r (it uses -Wl,-r instead,
which also works with gcc).
clang-initiated refactors.

Correct the following classes of errors, mostly codebase-wide:

1. Locals or arguments that shadow globals
2. Locals that shadow other locals
3. Functions that should be static but are not
4. Use of enum types to store bit flags
5. Uninitialized-but-maybe-used variables
6. Unused macros/variables/functions
More clang cleanups.

These touch main-x11, main-gcu, and the z-* libraries.
Merge remote-tracking branch 'elly/clang-cleanups'
Merge remote-tracking branch 'elly/clang-warnings'