logd: switch asprintf to std::string

(cherry pick from commit 73160acc5cb5236b30327569e6b51dbfe73e4a0f)

Bug: 23350706
Change-Id: I715cdd4563a09de3680081947a3439f0cac623be
7 files changed