Write object data recode

Follow-up to #825: Finishes breaking `write_object_data.cpp` into tiny pieces before we flush.

This shouldn't break anything, but if it does, it's going to break timelines. Please evaluate the changeset on something with timelines before pulling (I'm fresh out).