thd->enter_cond() and exit_cond(), so that the I/O thread accepts to stop when it's waiting for relay log space. Reset ignore_log_space_limit to 0 when the SQL thread terminates.
a deadlock between I/O and SQL threads in replication when relay_log_space is too small. This fixes bug #79.