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.
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.
Add subtypes of CAReduce since the match is type-exact.
Add c_init_code_apply().
Make GpuKernelBase use c_init_code_apply() and fix GpuEye to use the new API.
Allow string constants in kernel code to actually work.
c_code() for GpuCAReduce.

This is not pretty code, but it is working code.
Document c_init_code_apply().
Remove stray debugging print.
Return a proper version from c_cache_code_version().
Add checks in test after code review
Remove error in hessian if gradient is constant
Fix handling of shaped for 0-sized arrays.
GpuShape
Make debugprint() support int, long, float and ndarray.

This easy debugging as we don't always know the object type.
make local_subtensor_of_alloc detect the right broadcast pattern more frequently.

reported by Ira Korshunova
Fix the case where local_subtensor_of_alloc wasn't computing the right broadcastable. It was due to a wrong broadcastable in Subtensor.make_node()