bugreportz: don't write last line when it times out.

Bug: 112102388
Bug: 111720061

Test: m -j bugreportz_test && adb push \
  ${OUT}/data/nativetest/bugreportz_test/bugreportz_test /system/bin && \
  adb shell /system/bin/bugreportz_test
Test: m -j bugreportz && adb push ${OUT}/system/bin/bugreportz /system/bin && \
  adb shell setprop dumpstate.dry_run true && adb shell bugreportz -p

Change-Id: Ib4219d39070dc6958f83d4a2be34c212a9b1fe2b
3 files changed