Fix a memory leak and changes for MacOS
* Remove memory leak on application exit
+ Created icns file for MacOS
* Created scripts for building macOS application and dmg-file