Fix and refactor downloaded file handling in the loading stack

In download_to_file mode of resource loading, the resource handler needs
to call ResourceDispatcherHostImpl::RegisterDownloadedTempFile when the
file is created, and needs to call UnregisterDownloadedTempFile after the
client handles the file. Otherwise, the file is deleted before the client
uses it.
However, MojoAsyncResourceHandler doesn't call them, and that causes
layout test failure around XHR with responseType = 'blob'. This CL fixes
that by adding the RDTF and UDTF pair, and refactors similar code in
AsyncResourceHandler to share the same lifetime management of the
downloaded file in ResourceDispatcherHostImpl.

BUG=603396, 659917

Cr-Commit-Position: refs/heads/master@{#435551}
13 files changed