IDL: Determine maximum distinguishing argument index runtime, if needed

If an overloaded method is partially runtime enabled such that its
"longest" overload(s) might be disabled, we need to determine the
maximum distinguishing argument index runtime, to avoid using an index
for which all actual overloads are disabled, since that would typically
cause us to incorrectly reject the call as not matching any overload.

The implementation is largely a copy of the existing and very similar
runtime determination of the correct Function.length value.

While we're at it, drop the overloads['minarg'] value, which was just a
less accurate variant of overloads['length'] used in a few places where
it didn't really matter anyway.

BUG=486249

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

git-svn-id: svn://svn.chromium.org/blink/trunk@195251 bbb929c8-8fbe-4397-9dbb-9b2b20218538
6 files changed