Add pre-commit support
This includes a pre-commit configuration file, CI job and updating the source tree to match it. This should help avoid some back and forth to let code review be more about content instead of style in the future.
@smallorange and I talked about this, she may also bring clang-format support for the C files later.