Fix Custom Elements use-after-free when deleting an upgrade candidate.

The registration context's upgrade candidate map wasn't being cleaned
up properly when a type extension upgrade candidate was deleted.

This also makes removing an element's type extension the last thing
that happens as custom element processing winds down in its twilight
moments.

BUG=255725

Review URL: https://chromiumcodereview.appspot.com/19671007

git-svn-id: svn://svn.chromium.org/blink/trunk@154470 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Refactoring: Introduce ResouceLoaderHost interface for unloading ResourceLoader.

This moves several direct dependencies of ResourceLoader into
newly inroduced ResouceLoaderHost interface, which is implemented by
CachedResourceLoader.

The motivation here is to make ResourceLoader working without DocumentLoader
and FrameLoader so that scripts can be loaded through imported documents, which
doesn't have a DocumentLoader.

Note that CachedResourceLoader already lives without DocumentLoader in some case,
thus it is natural to localize such kind of complication there and keep ResourceLoader
straightforward.

BUG=240592
TEST=none
R=japhet@chromium.org

Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=154452

Review URL: https://chromiumcodereview.appspot.com/19574002

git-svn-id: svn://svn.chromium.org/blink/trunk@154471 bbb929c8-8fbe-4397-9dbb-9b2b20218538