Migrate codegen to new I/O results scheme, badly.

This is a nasty kludge and does *not* show the new scheme in its best
light! For the record, I like the changes, though in cases like this
they may be a pain. But I haven't worked at all to make it not a pain,
I've just patched it up a little. It's going to be being scrapped in
favour of macros once again, anyway. (Procedural macros! Yay!) That's
why I put no effort whatsoever into making nice LLVM codegen or even
vaguely pleasant code.