Save inner demon state periodically

Closes #15.
Rename timeout config options to timer

Better name.
Make ping timeout and timer configurable