Move instance management to D-Bus thread.

Currently, on method call completion,
Response/ErrorResponse instance is created on the Origin thread,
then is posted to D-Bus thread on deletion.

Rather, this CL creates and deletes instance on D-Bus thread
in common pattern.
Also, this CL handles an edge case better, where Origin thread
task runner is not running so PostTask is failing in
OnPendingCallIsComplete().
Previously, the instance was leaked, but with this CL
it will be unref'ed on the D-Bus thread.

BUG=739622
TEST=Ran trybots.

Change-Id: I4a75ad5d12d100607a39b801fb0ce2394c344fae
Reviewed-on: https://chromium-review.googlesource.com/664521
Commit-Queue: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Ryo Hashimoto <hashimoto@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#503497}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f69d99c90a25ee0a8ab5eaa5d358bc7fb8166261
2 files changed