gh-117323: Make `cell` thread-safe in free-threaded builds (#117330)

Use critical sections to lock around accesses to cell contents. The critical sections are no-ops in the default (with GIL) build.
11 files changed