IMAP: avoid gmimestream in send_data

because filtered gmimestreams don't support SEEK_* :-(
lock the selfpipe to avoid spin-lock