Update for out of the OpenCPN source tree build

This update contains the changes for the out of OpenCPN source tree build.
Tested for OSX and Linux. I don't have a Windows build environment.

Also fixed some minor problems.

One problem still remains. Under OSX the "use Textblocks" function in some itemmenus results in locking up the program and it has to be killed the hard way.