Remove some dead code and fix some pyflakes warnings in CodegenRust.py.