Use begin/endResetModel instead of reset

Qt 4.6 introduced a better way of resetting models with beginResetModel()/
endResetModel(). Call beginResetModel() before resetting internal data
structures, and then endResetModel() when finished. beginResetModel()
followed by endResetModel() is the same as calling reset().

Note: reset() is deprecated and is removed in Qt 5.