host: Place persistence back into the same control flow as the state changes that trigger it, so persistence is complete by the time the mutation returns.

This is more feasible than before since the amount of changes flushed to disk by ever persist call is now limited in scope, and doing so makes testing and other behavior less complicated.

Signed-off-by: Eric Myhre <eric@flynn.io>