Fix reselecting item after resetting the model
Before this commit, the last chosen item would not get selected
after change in the model (for example using Assign to tag... option
in the context menu). This commit fixes that behaviour by adding emiting
signal beforeLayoutResetModel before resetting the model, so the index
can be saved and later used for the view.
The model index that is being sent is always empty since the model
doesn't know which index should get selected after the reset.
ItemChooser decides to save the current index instead.