logd: refactor chatty deduplication logging

This code and comment is hard to follow, despite the operation being
simple, so refactor the code to be easier to follow.

Also, use std::unique_ptr instead of raw pointers as appropriate.

Test: logging unit tests
Change-Id: Id1f29f4deeca730d1e3b6856e1581d0b840f883e
4 files changed
tree: f96cec88c8c80cc5d5166dbfd69c2fcea80b2685
  1. liblog/
  2. logcat/
  3. logd/
  4. logwrapper/