Add tests for @keyframes parsing.

See #1290
Merge branch 'stable' into keyframes-parsing
Fix @keyframes parsing.

During the perform step, a rule's selector is parsed either according
to the normal selector grammar or according to the keyframe selector
grammar depending on whether it's nested within a keyframe.

Closes #1290
Merge branch 'keyframes-parsing'