Fix xor code gen.
Avoid needless constant pool usage.

For small values, we can be a bit smarter. This happens to cut the
constant pool size for CORE.setting bytecode by 15,000 entries. There
are more improvements like this.