Assorted serialization fixes.
Fix sprintf code-gen.
Support --javaclass option on selfhost.