users: Fix conversation with passwd re "you have to wait longer"
users: Fix conversation with passwd re "you have to wait longer"

The conversation goes something like this:

    $ passwd
    Changing password for anton.
    Current password:
    You must wait longer to change your password
    Current Password:
    passwd: Authentication token manipulation error
    passwd: password unchanged

Note that there is a second "Current Password" prompt, and that it has
different capitalization.  Previously, we would miss that prompt, but
often enough the "\n" that was sent as a reaction to "You must wait
longer" would answer it.  But often not, since passwd very likely
drains its input before reading a password.

Also, when matching a patterns in the middle of the buffer that just
set some flags, we should not reset the buffer and return. A real
prompt might be in the rest of the buffer.

Also also, we make sure that a timeout is shown with the intended
error message, and not "Your session has been terminated", which is
misleading.

Closes #14681
cockpit-project/cockpit,deryni/cockpit,deryni/cockpit,garrett/cockpit,deryni/cockpit,deryni/cockpit,garrett/cockpit,cockpit-project/cockpit,deryni/cockpit,cockpit-project/cockpit,garrett/cockpit,cockpit-project/cockpit,martinpitt/cockpit,martinpitt/cockpit,martinpitt/cockpit,cockpit-project/cockpit,martinpitt/cockpit,garrett/cockpit,mvollmer/cockpit,mvollmer/cockpit,mvollmer/cockpit,deryni/cockpit,mvollmer/cockpit,deryni/cockpit,mvollmer/cockpit,martinpitt/cockpit,garrett/cockpit