Tweak error handling when writing babel-state, use fsync.
Tweak error handling when writing babel-state, use fsync.

wlanslovenija/babeld,woniullb/babeld,sudomesh/babeld,Gwendocg/babeldToS,jech/babeld,Gwendocg/babeldToS,dtaht/babeld-shortrtt-metrics,Drooids/babeld,boutier/babeld,jech/babeld,wlanslovenija/babeld,tcatm/babeld