fix: check if is_dill before turning off _session for D2


git-svn-id: svn+ssh://svn.mystic.cacr.caltech.edu/pathos/dill@656 8bfda07e-5b16-0410-ab1d-fd04ec2748df
Merge branch 'master' of https://github.com/uqfoundation/dill