function binaryInsert(arr, element, comparator) {
	  var index = binarySearch(arr, element, comparator);
	  var insertionPoint = index < 0 ? -(index + 1) : index;
	  arr.splice(insertionPoint, 0, element);
	}
Inserts a value into a sorted array. This method allows duplicate, meaning it
allows inserting duplicate value, in which case, the element will be inserted
at the lowest index of the value.
@param arr The array to modify.
@param element The element to insert.
@param comparator Optional. If no comparator is specified, elements are
compared using array_util.defaultComparator, which is suitable for Strings
and Numbers in ascending arrays. If the array contains multiple instances of
the target value, the left-most instance will be returned. To provide a
comparator, it should take 2 arguments to compare and return a negative,
zero, or a positive number.