[ES6 modules] Detach ScriptModuleResolverImpl refs when detaching context.

Before this CL, we kept around strong v8::Module refs from
ScriptModuleResolverImpl after the context is detached.
v8::Module refers to the settings object Document via Modulator, so
lead to leaks detected by Blink Leak Detector.

This CL detaches the v8::Module strong refs from ScriptModuleResolverImpl
when we detach Document from the context.

This CL is meant to be a temporary fix. Ideally, we should convert
all v8::Module refs in ScriptModuleResolverImpl to weak refs.
However, it is not trivial as we need to rework ScriptModule.

Bug: 594639, 725816, 724818
Change-Id: If5b697bc87b9cd907333be0afe713888c1be2cf9
Reviewed-on: https://chromium-review.googlesource.com/517525
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#475340}
5 files changed