Core: Standardize indexOf comparisons

not present: `< 0`
present: `> -1`
at index: `=== N`

(cherry picked from commit 509406dd7c2763108819f9f29568309f48726237)

```
   raw     gz Compared to compat @ 2866da9e12b7cf339667ae894ffe072f4eb673de    
    +9     +4 dist/jquery.js                                                   
    +1     -4 dist/jquery.min.js
```

Ref #1984