[sieve] only 'fileinto' once per folder (RFC 3028)

Make do_fileinto() consistent with do_keep() in that if the action is
requested a second time, simply disregard the second and subsequent
request.

RFC 3028 [SIEVE]:
2.10.3.  Message Uniqueness in a Mailbox

   Implementations SHOULD NOT deliver a message to the same folder more
   than once, even if a script explicitly asks for a message to be
   written to a mailbox twice.
[sieve] fileinto: ensure last flag list value wins (RFC 5232)

The naive way of eliminating duplicates resulted in the first
(rather than the last) flag list value winning.  A solution
is to move the action to the end of the action list, ensuring
the last flag list value wins.

RFC 5232 [imap4flags] Sec 3. Actions:
   Note that when keep/fileinto is used multiple times in a script and
   duplicate message elimination is performed (as described in Section
   2.10.3 of [SIEVE]), the last flag list value MUST win.

RFC 3028 [SIEVE]:
2.10.3.  Message Uniqueness in a Mailbox

   Implementations SHOULD NOT deliver a message to the same folder more
   than once, even if a script explicitly asks for a message to be
   written to a mailbox twice.
[sieve] keep: ensure last flag list value wins (RFC 5232)

The naive way of eliminating duplicates resulted in the first
(rather than the last) flag list value winning.  A solution
is to move the action to the end of the action list, ensuring
the last flag list value wins.

This change has been copied from do_fileinto() to do_keep()

RFC 5232 [imap4flags] Sec 3. Actions:
   Note that when keep/fileinto is used multiple times in a script and
   duplicate message elimination is performed (as described in Section
   2.10.3 of [SIEVE]), the last flag list value MUST win.

RFC 3028 [SIEVE]:
2.10.3.  Message Uniqueness in a Mailbox

   Implementations SHOULD NOT deliver a message to the same folder more
   than once, even if a script explicitly asks for a message to be
   written to a mailbox twice.