Issue #22060: Clean up/simplify test_ctypes, use test discovery
Closes #22060: Merge with 3.4