Pepper: Access PepperMediaDeviceManager through a WeakPtr

Its lifetime is scoped to the RenderFrame, and it might go away before the
hosts that refer to it.

BUG=423030

Review URL: https://codereview.chromium.org/653243003

Cr-Commit-Position: refs/heads/master@{#299897}
  void EnumerateDevicesCallbackBody(
      int request_id,
      const std::vector<ppapi::DeviceRefData>& devices) {
    if (sync_call_) {
      base::MessageLoop::current()->PostTask(
          FROM_HERE,
          base::Bind(&ScopedRequest::EnumerateDevicesCallbackBody,
                     AsWeakPtr(),
                     request_id,
                     devices));
    } else {
      DCHECK_EQ(request_id_, request_id);
      callback_.Run(request_id, devices);
    }
  }

  void EnumerateDevicesCallbackBody(
      int request_id,
      const std::vector<ppapi::DeviceRefData>& devices) {
    if (sync_call_) {
      base::MessageLoop::current()->PostTask(
          FROM_HERE,
          base::Bind(&ScopedRequest::EnumerateDevicesCallbackBody,
                     AsWeakPtr(),
                     request_id,
                     devices));
    } else {
      DCHECK_EQ(request_id_, request_id);
      callback_.Run(request_id, devices);
    }
  }
