VM: preserve dependency code after failed module compilation
Commit
fd54d52d freed all bytecode added after the parent module's
compilation checkpoint, including successfully compiled dependencies.
Those dependencies remain cached, so a later import in the same VM
executes freed bytecode. This is reachable in the interactive shell
and in embedders that continue after a compilation error.
The fix is to remove eager bytecode cleanup while retaining removal of
the failed module from the cache so subsequent loads can retry. Keep
the removed module and its name in the VM pool because cyclic
dependencies and code metadata can still reference them. These
allocations are released when the VM is destroyed.
Add a shell regression test that retries a failed parent import and then
executes its cached dependency.