Allow prefetches to outlive their owning RenderViewHost.

This is a rework of r231910. Instead of putting the detachable logic in
AsyncResourceHandler, move it to a wrapper DetachableResourceHandler. On
detach, it simulates a cancel to the ResourceHandler it wraps and then
continues to drain the request itself. This should have fewer buffering
complications.

BUG=286186
TEST=ResourceDispatcherHostTest.Cancel,
     ResourceDispatcherHostTest.DetachedResourceTimesOut,
     ResourceDispatcherHostTest.DeletedFilterDetached,
     ResourceDispatcherHostTest.DeletedFilterDetachedRedirect,
     ResourceDispatcherHostTest.DetachWhileStartIsDeferred
     ResourceDispatcherHostTest.TestProcessCancelDetachedTimeout,
     ResourceDispatcherHostTest.CancelRequestsForContextDetached,
     ResourceDispatcherHostTest.DataSentBeforeDetach

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236132 0039d316-1c4b-4281-b951-d872f2087c98
Check overflow in subsample calculation/conversion.

We probably should use uint16 for SubsampleEntry::clear_bytes to be consistent
with BMFF Common Encryption spec. But I'd keep this CL minimal so that it's
easier to merge.

TBR=ddorwin@chromium.org
BUG=317999
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236133 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 236133