Enable and fix bugprone-misplaced-widening-cast warning.
Fix some modernize-macro-to-enum and readability-else-after-return
warnings, but don't enable them. While the warnings can be useful, they
are in general too noisy to enable.
Add a project-style compliant clang-tidy configuration file in the root directory. This configuration will take priority over users own configuration files, so noisy warnings have been removed even though they may be useful, at least for the time being.