Compute distinguishing argument index

The "distinguishing argument index" is the next part of the overload
resolution algorithm.

In overload resolution, you first distinguish by number of arguments,
then distinguish by checking the type of a single argument at some index;
this CL adds the index computation.

In practice it's just the first index where types differ,
but there are additional conditions to check.
http://heycam.github.io/webidl/#dfn-distinguishing-argument-index

Next CL will add the very lengthy "distinguishability classes".

After that we'll finally be ready to start changing the code generation,
based first on number of arguments, secondly on type!

Also:
* Some refactoring
* Fixes some tests that were invalid overloads, and were caught
by the new checks!
(No invalid overloads in actual IDLs, but test cases were too simple.)

R=haraken
BUG=293561

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

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