Serializable state output based on cli code

This is an interface to load/store state abstracting file access (so users of the lib can store in database for example).

The file `tgl-serialize` has the default implementation of storing in files, which is lifted from the telegram-cli loop.c file, and callbacks to get the path to those files.