[clang-tidy] Fixes to readability-implicit-bool-conversion (#72050)
- Fixed issue with invalid code being generated when static_cast is put
into fix, and no space were added before it.
- Fixed issue with duplicate parentheses being added when double
implicit cast is used.
Closes #71848