IDL compiler: sync Python to r166688 (and clean up special operations+union code)

Python side to:
Update HTMLFormControlsCollection's named getter to behave according to spec
https://codereview.chromium.org/157013006

This also involves lots of cleaning up to special operations and union type code,
making it more generic and avoiding duplication on the Python side.
* Rename collection => imp
* Rename element => result (for union type in/out variables)
* Remove blank lines in nested code

With a bit more cleaning (post-rewrite), special operations can use the
default methods code generation with only minor changes!

BUG=239771
TBR=haraken

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

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