Pickle and Unpickle theano functions

Added a test case to verify if pickle and unpickle a compiled theano function works.
Passed.
That's really fragile, you should go though the superclasses in the code that handles pickle_rm_attribute instead.