Allow Pickle/Unpickle of Theano function without recompiling

NEWS.txt
- New pickle of Theano function, with a Theano flags, can be unpickled without re-optimization. This allow faster unpickling of Theano function (Li Yao, Jean-Philippe Heng, Frederic B.)

This is a rebase of gh-2139
Add docstring