add BaseConvolutionLayer

This provides a common place for code used by ConvolutionLayer and
DeconvolutionLayer, simplifying the implementations of both.
rewrite ConvolutionLayer to use BaseConvolutionLayer helpers
add DeconvolutionLayer, using BaseConvolutionLayer