before deleting event data from db, check for successful HTTP response code and validate response JSON contains success; refactored endBackgroundTask & connection cleanup logic into a 'cleanup' method; added logging if connection failed to start; cancel connection when background expiration handler is called; removed some unnecessary code in CountlyConnectionQueue dealloc; minor code formatting changes