Try to leverage as much of logcat as-is and produce a viable
library API that others can use for their own logcat execution.
Added a test to check ANDROID_PRINTF_LOG environment variable.
Test: gTest logcat-unit-tests
Bug: 35326290
Change-Id: I30de692ea9d83e6fd6e5d9e7cf93d31401a88a40