added op for pooling
fixing couple issues
added gradients
added tests
refactor c_set_tensor4d
safer c_cleanup_code_struct
added opt
Merge branch 'dnn_pooling' of https://github.com/ynd/Theano into dnn_pooling