Multiple calls to remove item from history don't work #21.

After removing items from widget's model, subsequent items need to be
reindexed to correctly point at items in history's data sructure.

(cherry picked from commit 68eb16f929d6fd18d96607f72c916e3a5c27cada)
Clear clipboard if first element from history is removed.

Removed element should be removed from clipboard and this also solves
issue with restoring removed item after appliction's restart if this
item is in clipboard at that time.

(cherry picked from commit 9c898a3cab60feaa5178498b2a547ce22f28b464)