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
Couldn't you use [functools.partial](https://docs.python.org/2/library/functools.html#functools.partial) for that, instead or a specialized class?