Use extended attributes to define which interfaces are globals (fixes #1053).

This makes our approach consistent with Gecko's.
Merge pull request #3122 from Ms2ger/globals

Use extended attributes to define which interfaces are globals (fixes #1053); r=Manishearth