ci: Adjust Docker image to Debian 12 "bookworm"
Summary:
Changes in packages are significant, for instance:
gcc 10.2. --> 12.2
clang 11.0 --> 14.0
wine 5.0 --> 8.0
which requires certain adjustments provided in this PR.Partial backport of secp256k1#1356.
The first commit is missing due to a missing dependency, and part of the last one because we don't have windows support yet.
Depends on D18158.
This unbreaks the secp256k1 CI on master.
Test Plan: See CI (the issue occurs after the CI migration to bookworm) here: https://cirrus-ci.com/build/6479968802177024
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D18159