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
Don't pickle to a file. It pollute the file system. You can pickle to a string with dumps and load from a string loads.