script: Use atom comparison in more places, especially for attributes.

75% improvement in style recalc for Guardians of the Galaxy.
Merge pull request #3316 from pcwalton/use-atoms

script: Use atom comparison in more places, especially for attributes.