keeper: update in memory dbLocalState only after saving on disk
keeper: update in memory dbLocalState only after saving on disk

improve the in memory dbLocalState management forcing its update only after
being written to the local state file. In such way we'll only report the current
generation, dbuid etc... to the sentinel only after we are sure we have saved it
locally.

sgotti/stolon,sorintlab/stolon,sorintlab/stolon,sgotti/stolon