Added workaround to overcome Octave's convn() bug.

+ Added wrapper function 'custom_convn' to choose between three ways of
computing the convn(). The default behaviour is to use convn() and to
choose between 'valid' and 'same' according to the platform(Matlab or
Octave).
A third option is to use 'fft' which uses FFT based convolution.
Although this is very slow, the library can be compiled to support GPU.
Check the code for more info.
+ Added an utility function 'isOctave()' to tell which platform is being
used.
+ TODO: We should use custom_convn() everywhere, but this may slow
things down too much.
+ test_cnn_gradients_are_numerically_correct fails with convn(,,'same')
but works with convnfft.