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
@yaoli replace this by this:
pickle_rm_attr = ["replace..", "repla...", "replace..."] + History.pickle_rm_attr + Validator.pickle_rm_attr