Implement Element.matches().
Merge pull request #2772 from saneyuki/match

Implement Element.matches().