logcat: Add --max-count option

(cherry pick from commit 6ac498d4bbfe262595a77bacb2df9bda2c128222)

This new option causes logcat to quit after it prints N messages.

Test: New unit test passes
Bug: 27706081
Change-Id: Ie52ddf300160a041e68a6bac0ae7ade68bb28a7c
2 files changed