some undo issue preventions (clearImage & deleteSelection)

1. Prevent from unnecessary updates
2. Prevent from extra undo backups
3. Optimised if-else
Merge pull request #108 from eVoLuTiVeMEDIA/master

Some undo issue preventions for clearImage & deleteSelection