ScriptStateToId should be a map from RefPtr<NewScriptState> to int

Currently InjectedScriptManager and InspectorRuntimeAgent hold a map from NewScriptState* to int. However, this is dangerous since no one keeps the NewScriptState* alive. We should use RefPtr<NewScriptState>. (Note: Using RefPtr<NewScriptState> won't cause any cycle because it doesn't hold a strong reference to anything.)

BUG=367069

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

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