Draft: Bug 40627: Rebase to 102.4esr
This was a difficult one, so leaving it unsquashed for reviewing purposes (but not marking as a draft so that the review bot sets a reviewer).
Also, I think we should merge a few other MRs before this one.
Note for the reviewer: please don't accept it yet, if you think it's okay, but leave a comment. Then I will squash and force-push.
Known change: #41014 (closed) should have been changed in the first preference commit.
Range diff:
git range-diff FIREFOX_102_3_0esr_RELEASE..upstream/tor-browser-102.3.0esr-12.0-2 FIREFOX_102_4_0esr_BUILD1..HEAD