clang-tidy: address `google-readability-casting` lints

At least those involving `static_cast`.
30 files changed