noop log calls if LogLevel is LogNothing

I've only experienced this on qt5 builds, but for some reason with
the default log level of LogNothing, calls to KDSoapServer::log
result in continuous warning about the QIODevice not being open
for writing

For completeness I've added some checks for flushing and closing the log file as well