Save the initial state during optimizaiton.
Merge branch 'feature/write-init-during-opt' of https://github.com/stan-dev/stan into feature/write-init-during-opt