[mypyc] Remangle names produced by allow-redefinition (#11175)
Fixes mypyc/mypyc#702 by replacing "'" with "__redef__",
although this assumes nothing else will ever use demangling
for now.
Only locals need any fix; a run testcase was added to verify
that it works already for globals, and since the fix for locals
is on the ir level only an ir testcase is added.