logcat: replace write() calls with WriteFully()

There is a possibility of data loss if an interrupt occurs in the
middle of these write() calls.

Test: logcat -g/-S/-B work correctly
Change-Id: I2dd4ec10771714fc49b61538d3028983516e106c
1 file changed