IDL compiler: Overloaded methods with optional or variadic arguments

This implements GenerateFunctionParametersCheck from Perl.

This also refactors the code so the check generation happens in Python;
this is necessary because it is quite complicated (especially once we have
type checking).

Existing logic is incorrect for optional + variadic,
but there are no actual examples (very few variadic methods),
so just leaving a FIXME for now.

Next CL will implement type checking, which will finish basic overloading.
(Some extended attributes also: [StrictTypeChecking] and [PerWorldBindings].)

BUG=239771
NOTRY=true

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

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