IDL Compiler: Make [PerWorldBindings] work with [DoNotCheckSecurity]

Update the perl bindings generator so that using [PerWorldBindings] in combination
with [DoNotCheckSecurity] will actually do what the user expects.

Previously, it generated half of the necessary *ForMainWorld() static functions
and never used them.

This affects at least the generated code for the assign() and replace() operations
in Location.idl.

Kuddos to Laszlo Gombos for enabling the warnings and notifying me that we had
unused functions in the generated bindings.

R=haraken
BUG=312287

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

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