Redmine#5655 Force removal of keys and their dependencies in cf-key

(cherry picked from commit 5fb3dac56739f7ac6412edea479b48c748afa827)
Redmine#5655 Fix bug in coherence mode of removal of IPs in cf-key

(cherry picked from commit 87bdc346ac44da63ae127aa8d39f3790c4d2c778)
Redmine #5819: Fix failing chpasswd execution on Ubuntu 10.04.

Ubuntu 10.04 chpasswd doesn't support the '-e' option, so check for it
before executing. We reuse the function that checks for '-M' and as
part of this, the cached return value was removed. Slightly less
efficient, but the function is only called if something changes, and
you'd have to modify users in the thousands before it becomes a real
problem.

(cherry picked from commit 8e27296ae244ab9ae327d15e362e9c8738955d6b)