Check whether a given object exists in an array

@example
wysihtml5.lang.array([1, 2]).contains(1);
// => true
function(needle) {
      if (arr.indexOf) {
        return arr.indexOf(needle) !== -1;
      } else {
        for (var i=0, length=arr.length; i<length; i++) {
          if (arr[i] === needle) { return true; }
        }
        return false;
      }
    }