When starting the worker function, close the connection only if it was opened by an AJAX request. 

The only other way to start the worker is Cron and there's no point in closing the connection in that case. Also, a user reported that the "Connection closed" output was cluttering their cron logs.

git-svn-id: https://plugins.svn.wordpress.org/broken-link-checker/trunk@999695 b8457f37-d9ea-0310-8a92-e5e31aec5664