Set applicationName and organizationName in main()

So we won't have to set them on every QSettings instantiation.
Use Qt 5.3 categorized logging, fix coding style issues