Add preliminary handling of media rules.

Diffing media rules is not yet fully implemented.