Infrastructure for disabling GC and deriving trace hooks automatically.

Needed for https://github.com/mozilla/servo/pull/1591 .