Apply fix supplied by Alan in his Branch '~alan-paterson/openpetraorg/20130115_alan_net_remoting', Rev. 2178:
"Fix for an issue where the application stays in memory after it has been closed.  This was caused by the thread still running that closes the application when it has been running for X minutes.  The fix is to ensure that this thread is set as a background thread."

see http://bazaar.launchpad.net/~christian-k/openpetraorg/20140624_webservices_branch__client_server_fixes/revision/2588