Handle CouchInternalServerError exception

Handle CouchInternalServerError exception when calling HeartbeatAPI.updateWorkerHeartbeat() in the event loop in BaseWorkerThread by printing an error message in the log and skipping the algorithm. This way we avoid crashing the worker when there was an error contacting CouchDB presumably because the server was busy. We instead just stay in the loop printing error messages until the problem disappears.