[mypyc] Fix vtable construction for deep trait inheritance (#20917)
Fixes https://github.com/mypyc/mypyc/issues/1189
The core issue: `compute_vtable` iterates `cls.traits` (direct parents
only) instead of the full trait MRO, so when an intermediate trait is
empty, grandparent trait methods are never added to the vtable.
The difference between `cls.traits` and `all_traits` for the issue's
repro is the following:
```Python3
Class Child
-----------
- cls.traits:
• Middle --> {}
- all_traits:
• Child --> {'derived': <FuncIR Child.derived>}
• Middle --> {}
• Base --> {'value': <FuncIR Base.value>}
```