[CRASH] cudnn softmax r1
small code refactoring
Merge pull request #2357 from nouiz/cudnn_repair_r1

[CRASH] Cudnn repair r1 softmax
Add cuDNN version information.
Use the dynamic dnn version too.
cache the cudnn version
make cudnn softmax support R2
Make dnn pooling compile again R2
make conv cudnn work with R2
Use the new name in the code.
better error message
Fix crash in new cudnn R2 conv code in full mode
better error message
crash fix and better error message
Rework COp to allow all methods to be defined.
Make as_scalar() work with tensors that have ndim == 0.
Three changes:

 - Split the C code apart in between the Conv ops (the previous
   solution is not workable with the new interface).

 - Move the C code out into separate files using COp.

 - Make cudnn_helper.h provide wrappers exposing the R2 api with the
   R1 functions when possible to reduce #ifdef maze in actual function
   code.
Fix test_version to match reality.
[CRASH] fix cudnn r2 softmax compilation
Fix some problems with cudnn R1.