test: make the test suite independent of run order (#6261)

Under pytest-randomly (see #6037), several tests failed because of state
left by earlier tests:

- Reset all ConstructorStats values and counts before each test.
- Reset the static Eigen matrices in test_cpp_casting.
- Skip the PyGILState_Check probe after a subinterpreter was created,
  because CPython then turns the check off.
- Collect garbage before the first refcount in test_class_refcount.

Assisted-by: ClaudeCode:claude-opus-5-5
7 files changed