Pickle and Unpickle theano functions

Added a test case to verify if pickle and unpickle a compiled theano function works.
Passed.

This is the follow up of gh-1945
Just revert that change. They are equivalent and the original code was more clear. It could trigger different python memory behavior and so could cause different memory optimization order in the past. So it could have fixed something in a particular case. Now I fixed the different memory order at the root, so all should be good.