Optimized applyAnnotations by usage of filter().
Added output of annotation ids and rendering of subranges.
Performance optimization of Text.partition