EHN: get_event in the presence of bad samples

When calling method get_event on a dataset that contains bad data
samples, only those events that do not overlap with the bad data
range will be returned. Both the position (the Sample) and the
offset and duration of the events will be taken into consideration.