[imap] fix seg fault in append.c

was introduced by
use strarray_t for appendstage.flags[]
[imap] lmtpd.c: prevent possible segfault

introduced by:
Replace struct sieve_imapflags_t with strarray_t