logger: fixes file size count

This CL fixes the broken file size and buffer size counting for
uci_logger in existing stack. The BufferedFile struct is refactored to
prevent user from changing the file content without updating the file
size.

Test: mmm .
Test: atest --host-unit-test-only .
Bug: b/246915776
Change-Id: I13e7fe4525fbc2299d8b567f3953b4c476df7805
1 file changed