move need_save_resume_data to when a piece is completed instead of when it's written to disk
move need_save_resume_data to when a piece is completed instead of when it's written to disk

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