Refactor: fix clangtidyfull and some lambda this captures
The clangtidyfull
job currently fails. Example: https://gitlab.com/speleo3/inkscape/-/jobs/5662814191
This MR applies the suggested refactorings.
Also fixes some lambda this
capture warnings in files which don't conflict with the gtk4 branch.