debuggerd: verify that traced threads belong to the right process.

Fix two races in debuggerd's PTRACE_ATTACH logic:
  1. The target thread in a crash dump request could exit between the
     /proc/<pid>/task/<tid> check and the PTRACE_ATTACH.
  2. Sibling threads could exit between listing /proc/<pid>/task and the
     PTRACE_ATTACH.

Bug: http://b/29555636
Change-Id: I4dfe1ea30e2c211d2389321bd66e3684dd757591

static int audit_callback(void* data, security_class_t /* cls */, char* buf, size_t len)
{
 struct debugger_request_t* req = reinterpret_cast<debugger_request_t*>(data);

 if (!req) {
        ALOGE("No debuggerd request audit data");
 return 0;
 }

    snprintf(buf, len, "pid=%d uid=%d gid=%d", req->pid, req->uid, req->gid);
 return 0;
}

static int audit_callback(void* data, security_class_t /* cls */, char* buf, size_t len)
{
 struct debugger_request_t* req = reinterpret_cast<debugger_request_t*>(data);

 if (!req) {
        ALOGE("No debuggerd request audit data");
 return 0;
 }

    snprintf(buf, len, "pid=%d uid=%d gid=%d", req->pid, req->uid, req->gid);
 return 0;
}
