improved maxPoolingBwd in cnnCost