[mms] Add Horde_Session::ENCRYPT flag for session data.
Use new Horde_Session::ENCRYPT flag to store password in session
Use new Horde_Session::ENCRYPT flag to store password in session
[mms] Horde_Session now handles resetting the secret key on login.
[mms] Add preferred way of retrieving password - by passing in callable to 'password' parameter.
Use the new 'password' callable parameter to store password for Imap object

This *should* transparently work around issue where secret key changes
when IMP is used as the authentication application.
[mms] Update session data stored with secret key if session ID changed and we are using non-cookie based sessions.
Convert dynamic password generation from callable to a Horde_Imap_Client_Base_Password object
Use Horde_Imap_Client_Base_Password to dynamically generate password for Horde_Imap_Client
Merge branch 'master' into bug_12590
This is not needed anymore
Merge branch 'master' into bug_12590
Don't filter out FLAG_DELETED messages.

This can cause all kinds of problems in supporting this for both
CONDSTORE and non-CONDSTORE servers. If using ActiveSync and a MUA
that does NOT use a Trash folder (as EAS expects), then the trade
off is that messages flagged as \DELETED will still appear as
"normal" on the EAS client.
Use the '+' operator instead of array_intersect_keys here.

For non-CONDSTORE servers, this persists messages in state that have
fallen outside of the FILTER range for the client. Otherwise, if the
user deletes a message that has fallen outside of FILTER, the change
will never be picked up by the client. Need '+' instead of array_merge
since array_merge will reorder numerically indexed arrays.

Even when SOFTDELTE is implemented, there will be a small window of
time where a MUA may delete a message that has fallen outside of FILTER,
but before SOFTDELETE was sent to client.
Do not pollForChanges if we have imported any incoming changes.

Saves a potential backend ping on each collection.
No need to update any folder data on ping.
Merge branch 'master' into bug_12590
Detect deleted messages in ping() for non-CONDSTORE servers

We store the total number of messages per folder.
If a messages is deleted, the total number will change.
If a DELETE+ADD happens at the same time, UIDNEXT will still increase.

Note: I didn't increase the folder cache version on purpose.
Otherwise we lose the cached flags for no good reason.

Signed-off-by: Michael J Rubinsky <mrubinsk@horde.org>
Tweak comment.
phpdoc, cs