Implement non-blocking version of cord_join()

Other changes:

 * Saving/re-throwing original exception caused cord to terminate
Add memset() to cord_start() and fix potential bug in cord_join()
Fix #578: Rewrite JOIN handler to use pthreads instead of fork()