codeql: fix error "Resource not accessible by integration"
- Enable codeql writing security-events.
GitHub set the default permissions to read, apparently since earlier
this year.
Ref: https://github.com/github/codeql-action/issues/464
Ref: https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/
Fixes https://github.com/curl/curl/issues/7575
Closes https://github.com/curl/curl/pull/7576