Limit tradefed log files to a maximum size.

Refactor the implementation to limit device logcat size to a common
SizeLimitedOutputStream class, and use it for both host log and
device logcat storage. This new implementation also improves the
accuracy in which the 'max data size' attribute is adhered to.

Bug 8095071

Change-Id: I442aa41bb799d2dc3e94385e073333d1e69ae6d9
11 files changed