Added option allowDuplicates

Used to allow users to add the same entry more than once.
Modified addToSelection() and _sortAndTrim() methods to
operate differently according to allowDuplicates' option value.