Let the state writer callback actually take in the state.
Merge branch 'master' of https://github.com/funsim/OpenTidalFarm