shp export for detections/trajectory
refactory duplicated code
exlude 'deleted' attribute from detections.shp

only include 'deleted' attribute type/values if includeDeleted=true