Use == instead of match for tests against a single enum value

The performance of using == should now equal that of match, so many
identity methods can be simplified to a single line.

Fixes #1596.
auto merge of #2372 : mrobinson/servo/issue-1596, r=metajack

The performance of using == should now equal that of match, so many
identity methods can be simplified to a single line.

Fixes #1596.