Embedded IDs did not benefit from any of the recent optimizations (especially for undo case) when writing regular IDs (cleaning up of some pure runtime data that would generate a lot of fake 'changed on undo' status). Now factor out of `write_file_handle` this part of the code generating temp ID copy with cleaned-up data for writing, and expose it in BLO API such that IDs owning embedded ones can also use it.