Intoduce ResEntryWriter unit.

ResEntryWriter is responsible to write pairs of entry+value into binary
buffers and allows easy customization how and where entries are written.

This is no-op refactoring and all existing tests should pass.

Bug: b/249793372
Test: Existing tests
Change-Id: Ica98a25aeb49cc96cad28547c462b36316a8adb6
4 files changed