Make $.contains more efficient

The previous implementation checked every single array element even if it has already found a match.
Merge pull request #36 from nubbel/feature/contains-performance

Make $.contains more efficient