Tune InsertStringCommand and RemoveStringCommand to minimize LineInfo invalidation.