unify signal handling for KWrite & Kate
install the signal handler after application startup, the quit() will only make sense if we arrive at the exec anyway
use the application as context object, if that is already dead we shutdown and can just ignore the stuff
make kateshared plublic to be able to use the target include directory for unit tests, too