Add test cases, add support for :has(foo) pseudo-class. (See http://api.jquery.com/has-selector/)