Sentinel: call sentinelFlushConfig() to persist state when needed.

Also the sentinel configuration rewriting was modified in order to
account for failover in progress, where we need to provide the promoted
slave address as master address, and the old master address as one of
the slaves address.
Sentinel: rewriteConfigSentinelOption() sub-iterators var typo fixed.
Sentinel: arity of known-sentinel/slave is 4 not 3.
Sentinel: when writing config on disk, remember sentinels runid.
Sentinel: no longer used defines removed.