Change `.forEach()` to `for ()` loop with break
Follow-up to change
1edba8029, which replaced:
$.each( array, function ( index, value ) { ... } )
by:
array.forEach( function ( value, index ) { ... } )
`jQuery.each` makes a break of the loop on a `return false`.
`Array.prototype.forEach` ignores the return value and there
is no way to stop or break a `forEach()` loop other than by
throwing an exception. [1]
A `$.each` with a `return false` could be replaced by
`Array.prototype.find`, but `find()` is not part of ES5. [2]
return this.getItems().find( function ( filterItem ) {
return filterItem.isSelected() && filterItem.isConflicted();
} );
So a simple `for ()` loop with a `break` or a `return` is
used in these cases.
Also explicitly specify `undefined` as possible return value
in FiltersViewModel.prototype.getFirstConflictedItem.
[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach
[2] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find
Change-Id: I0af89d39ed789f49e06b25cac14ecd995ba58cbd