Add a matches and matchesSelector function to replace jQuery's .is().