Add support for subsampling and gradient to GpuDnnConv

This adds a grad() method to GpuDnnConv and adds support for subsampling.  It also allows choosing between convolution and cross-correlation mode (however cross-correlation mode has not been tested).

I've also made a base class that create the cudnn handle to make other ops easier to write.
> I don't see what's wrong with three yields.

The three yields just took more mental effort to understand (read three statements, compare them to see which arguments differ, find out what these arguments are for). `for subsample in ...` directly conveys what we want. Thanks for changing it!