studio: TargetFunctionsModel: Use beginResetModel/endResetModel

The documentation for QAbstractItemModel discourages the use of
reset(). beginResetModel() and endResetModel() should be prefered.
Use them when recreateTreeFromDescription().
studio: Fix issue 310

In TreeChainsawFilter, the persistent indexes must be invalidated when
the underlying model (sourceModel) is reset(). Otherwise, we will end-up
with invalid indexes, and this may cause a segfault when attempting to
access the data.
Merge pull request #312 from vaussard/fix-issue-310/1.3

Fix issue 310