IDL: Generate trace() method in union container types when required

If any union member type needs tracing, generate a trace() method that
does that tracing.

BUG=240176

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

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