Encapsulate errors encountered during cluster runs.

Also, put results & errors hashes in a semaphore, as Ruby hashes are
not supposed to be thread-safe (even though with the GIL they mostly are).