net: Make net::DrainableIOBuffer constructors take scoped_refptr.

The net::DrainableIOBuffer constructors currently take in a
net::IOBuffer base as a raw pointer, then assign it to a
scoped_refptr<net::IOBuffer> member, thus taking a reference.

This CL turns the raw pointer parameter into a scoped_refptr, and uses
std::move() during the member assignment. So, the reference-increment
operation is pushed from the constructors to the construction callsites.
No new increments are introduced.

The CL also modifies the DrainableIOBuffer construction sites, using
std::move() where possible to remove reference increments.

Bug: 479898
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Change-Id: I95cd0973d5e25c2565ddecfa0e06a3fc15e1f7b9
Reviewed-on: https://chromium-review.googlesource.com/1188955
Commit-Queue: Victor Costan <[email protected]>
Reviewed-by: Matt Menke <[email protected]>
Reviewed-by: Lei Zhang <[email protected]>
Reviewed-by: Dmitry Gozman <[email protected]>
Reviewed-by: Nicolas Zea <[email protected]>
Reviewed-by: Cait Phillips <[email protected]>
Reviewed-by: Jamie Walch <[email protected]>
Cr-Commit-Position: refs/heads/master@{#587471}
39 files changed