Recalculate and reset selection when uncrustifying selected lines

Changes replacement of fragments to be done inside the textStorage
so the actual edited ranges are available for re-selection afterwards.