major refactor of how chanopts are loaded:
using c++ idiom for serialization and storage