I'm one of the people who could not upload images after upgrading, despite everything. I have now solved the problem.
I noticed that my upload path in Settings Miscellaneous was /wp-content/uploads with a prefix slash.
I removed the first slash, and everything now works fine.
Of course I feel a bit like an idiot, having spent so much time and effort trying to solve the problem. I am mentioning it here because I swear I did not put that slash there myself, certainly not at any stage of upgrading, and everything was working well before.
I don't know where the slash came from, but maybe it will help others to see whether that is their problem too.
Thanks to everyone who has been working on this problem.