Added crop and delete functionality
This change adds a lot of code duplication between the data::Analog and
data::Logic classes. The solution could be to create a generic parent
class that handles the common parts (e.g. SegmantHolder<SegmentT>), or
to use a utility class.
Small fixes on crop and delete

Properly handle the case when decoders are not enabled.
Use a lock when accessing data.