IDL build: factor out global constructors action into a GYP template

Followup to:
IDL build: factor out global objects action into a GYP template
https://codereview.chromium.org/316173008/

R=haraken

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

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