Ask user to save file when opening Sample files

This pull request fixes the following defect:

- [MAGN-2163 User not prompted to save existing file while opening Samples from Help](http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-2163)
- Now opening a file (through Open or Sample menus) properly clears the undo stack
- A duplicated