logd: serialize accesses to stats helpers

Quick low-risk to resolve possible hash table corruption.
Resolved an unlikely path memory leak.

ToDo: replace lock with nested lock so no lock
      helpers are required.

Bug: 22068332
Change-Id: I303ab06608502c7d61d42f111a9c43366f184d0c
4 files changed
tree: 7f060af8f54b96d93368cf22e0acd6c2140c5872
  1. liblog/
  2. logcat/
  3. logd/
  4. logwrapper/