Added second derivative to max downsampling function
mod derivative
- Only run local optimizers on the ops they are registered for.
- Fix existing optimizers in base code to register properly.
Copy over cuda/nnet.py to gpuarray/nnet.py
Copy over cuda/tests/test_nnet.py to gpuarray/tests/test_nnet.py
Change parent classes, add c_headers and c_compilers methods
Change float type to npy_%(dtype)s
Change x->nd to PyGpuArray_NDIM(x)
Change CudaNdarray_HOST_DIMS to PyGpuArray_DIMS
Change CudaNdarray_HOST_STRIDES to PyGpuArray_STRIDES
Change CudaNdarray_DEV_DATA to PyArray_DATA
Convert output creation to use pygpu_empty
Remove non-ported code
Partially fix failing tests
Make PatternSub register the proper trackings and fix a bunch of call sites of local_optimizer to use the proper calling form.

Most of the tests pass now, except a bunch in the Cuda backend.
Fix local_optimizer() call sites in cuda and gpuarray backends.
Remove import not used and fix output dtype computation.
Make variable name more descriptive
Fix compilation crash
Fix compilation crash and strides usage.