Synchronize mailimap deletion against async operations

Right now main thread can free mailimap while its background thread
is still performing operations on it. Fix it by moving deletion to
the worker thread and making sure nobody uses stale pointers.
Use memset to initialize struct etpan_thread_op

also remove duplicated zeroing.