fix pickle cache leak

rebase of gh-1513 and a good fix to the pickling of Composite.

NEWS.txt
- Fix pickling of Composite op (Pascal L. and Frederic B.)