Delete all user's sessions when its password is changed (refs #3836)

- When a user changes its own password, then all its sessions will be deleted
  except the one currently in use.
- When the administrator changes a user's password, then all of this user's
  sessions will be deleted.
Merge pull request #786 from eguaj/3.2-A3836

Delete all user's sessions when it changes its password (closes #3836)