Migrating to CMake build system

Done work for migrating from custom build system to cmake (more common). If you decide to merge this into upstream, you may also want to copy guides on building this app under Mac OS X from Wiki in my fork (https://github.com/vmax/texteditor/wiki/Building-under-Mac-OS-X)