Merge 2.10.x into master.

Notes on this merge:

- backported commits were avoided by using multiple merges and -Xours on backported ranges.
- b07228aebe is excluded from the merge because it breaks master, as recounted on internals.
- I don't know what is the significance or importance of the change to test/files/run/t6028.check.

Review by any willing party, @adriaanm, @retronym, etc. Don't make the merge commit stew - they don't improve with age.. Think of them as the bananas of the commit universe.