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
I'm pretty sure that somewhere is scan_utils there is a function to compare two graphs for equivalent computations that does not need to do any cloning.  I'm not sure if you need to ensure that then inputs and outputs are the same in numbers and types before though.