Better handle of filter destruction

This commit enable a better filter and sorter handling.

While a sorter is destroyed (often in QML context), it will trigger
a resort of the visible data.

While a filter is destroyed, it invalidates all the cached data
for nodes that used that filter. It is rather dangerous to
destroy filters dynamically, since there would be data-loss in the
cache. So it is better to destroy them if we know that we will
never use a node again, or do not destroy them at all.