[CSTP] Prevent segfaults on out-of-bounds access.
[Util] MergeModel::RefreshIndex().
[Util] ModelItem::GetRowCount().
[Util] Update indexes following inserted/removed ones.

Fixes segfaults and incorrect behavior in MergeModel.