Fix infinite loop on flush

Fix infinite loop in the io_flush routine with a cache in a SIGSTOP state. The loop of while(write_length) will never exit currently if MEMCACHED_TIMEOUT is returned from io_wait.

This issue stopped every single cache expiration daemon for minutes when a machine was in a bad state.