made load_state and save_state more data-driven to reduce code repetition
made load_state and save_state more data-driven to reduce code repetition

deluge-clone/libtorrent,deluge-clone/libtorrent,deluge-clone/libtorrent,deluge-clone/libtorrent,deluge-clone/libtorrent,deluge-clone/libtorrent