Replace jQuery.each() with Array.prototype.some() in CodeHintManager and CodeHintList

As discussed in #3208. 

CC: @peterflynn