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

Implement Element.matches()