RAIS: fix Kryo serialization and setLength behavior

This is critical for big image (and slow setId) support.  See #12001.
Fix small discrepancies in I/O introduced during component migration
Merge pull request #924 from melissalinkert/emergency-io-fixes

I/O fixes for ticket #12001