Allow comments inside IDL interface extended attributes

Comments inside IDL extended attributes don't work, due to ad hoc parsing
in compute_dependencies.py failing to parse these correctly, thus not
generated constructor on global objects IDL files correctly.

This fixes this by explicitly stripping comments,
and also has some minor cleanup.

No change in generated code.

Also noticed two other bugs, to fix in followups.

BUG=311575

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

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