tools.structure: allow pickling of structures that originate from 'expr' and 'sym' usage