[sieve] bc_eval.c: support for imap4flags hasflag test

Should work with typical usage.  Need to evaluate for :count support.

Also added comment to bc_generate.c and bc_emit.c to add support for
:count to hasflag, possibly in conjunction with :regex
[sieve] update sieve_fileinto() and sieve_keep() to use :flags parameter

updated imap/lmtp_sieve.c and sieve/test.c
[sieve] sieve.y: verify :flags parameter is a valid list of flags
[sieve] sieve.y: free_ftags(): free flags stringlist
[sieve] sieve.y: support for space-separated flags within a string

Effectively change "flag1 flag2" to ["flag1", "flag2"]
[sieve] tree.c: free flags stringlists in free_tree() and free_test()
[sieve] sieve.y: 'require' imap4flags for hasflag test and :flags arg
[sieve] Anticipate bytecode changes for VARIABLES extension

Combined generation of bytecode for hasflag test and header test into
a single case.

The bytecode changes for the set/add/remove-flag actions will be done
at a later date since they will be re-definitions anyway.
[sieve] bc_dump.c: support imap4flags keep, fileinto, hasflag

Added support for dumping mostly-flat bytecode as generated by
bc_generate.c for the modified keep and fileinto actions, supporting
the :flags argument.  Also added support for dumping mostly-flat
bytecode for new hasflag test.

Modified the comment at the start of the file to better describe the
file.
[sieve] sieved: update bytecode decompiler for imap4flags

:flags arguments to keep and fileinto actions
hasflag test
[sieve] added varlist.{c,h} in anticipation of the variables extension

Defines a named linked-list of strarray_t's.  Each variable is stored as
a strarray_t in var, with the variable name stored as a string in name.
[sieve] remove dependence on actionflags parameter

The imap4flags extension introduced an actionflags parameter.  It
helped decide whether to use the internal imapflags variable when
appending a message, or whether to use user-specified flags when filing
the message.  This commit removes dependence on that parameter.  The
actionflags parameter can now safely be removed.
[sieve] bc_eval.c: add :count match-type support to hasflag test

We can't have :count and :regex at the same time since they are both
MATCH-TYPEs
[sieve] move verify_flaglist() to flags.c for reuse elsewhere

Once we add the variables extension, we won't be able to check for
flag validity in the parser (sieve.y).  This allows us to use
verify_flaglist() wherever else we need it.
[sieve] sieve.y: an invalid flag should not cause a parsing error

[IMAP4FLAGS] Section 2 "General Requirements for Flag Handling" says
"If a flag validity check fails, the flag MUST be ignored", which for
us means that we simply remove the invalid flag from the list.
[sieve] properly handle NULL flag lists

message.c:
- changed do_setflag() to only clear out the flag list
 - use do_addflag() to add any flags after clearing the list

script.c:
- ACTION_SETFLAG: only clear out the flag list

bc_eval.c:
- B_KEEP, B_FILEINTO, B_SETFLAG: only add non-null strings to flaglist
- B_SETFLAG: consolidate addflag code

sieve.y:
 If a flag list is empty after sanitization, add a single empty string
 to the list.  This allows the bytecode to reflect the difference
 between no :flags parameter, and a :flags "" parameter specifying that
 there should be no flags applied.
Revert "[sieve] update sieve_fileinto() and sieve_keep() to use :flags parameter"

This removes the actionflags parameter that we added earlier on in
implementing the imap4flags sieve extension.  Since we have removed
dependence on this parameter, we can remove it from the functions that
previously used it.
[sieve] complete removal of no-longer-used actionflags parameter

Removed actionflags parameter from do_fileinto(), do_keep(),
sieve_fileinto_context_t, and sieve_keep_context_t
[sieve] remove superfluous sieve_addflag() and _removeflag() functions

- strarray_add_case() is identical to sieve_addflag()
- strarray_remove_all_case() is identical to sieve_removeflag()
[sieve] bytecode: don't emit unused :index parameter for hasflag test

We initially used identical bytecode for header and hasflag tests.
This patch makes the bytecode formats differ by using a code position
for the :index argument only in the case of a header test.