Fix eraser mode to be reset when the same color is picked from the canvas
This functionality was broken by the fix for not emitting resource change signal when the resource does not change (commit 40adc162). Now the resource manager has one more signal --- resourceChangeAttempted(key, value). This signal is emitted before the actual resource change and it doesn't depend on whether the resource has changed or not (emitted in both the cases).