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
We should try to run `func2`, and maybe check that it gives the same results as `func`.