idmap2: create in-memory FRRO before creating file

Re-order the serialization of an FRRO and creation of the backing file.
This prevents a dangling (empty) file if the serialization fails.

Bug: 189963636
Test: manual: cmd overlay fabricate <bad parameters>, verify no file created in /data/resource-cache
Change-Id: I1af88c6d2d1c3a881beecfb50ccaf541a249f39b
1 file changed