Refactor ResourcePool::AcquireResource() and add test.

This CL has no intended functional effect.

Separate AcquireResource() into the functions ReuseResource() and
CreateResource() and write a test.

BUG=44872
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

Review-Url: https://codereview.chromium.org/2243013002
Cr-Commit-Position: refs/heads/master@{#411998}
3 files changed