[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.