implementation of two linesearches in theano

one of them is based on only evaluating the function, the other
one respects the strong wolfe condition and implies also computing
the gradient with respect to the scalar we optimize.
pointer to the code I inspired myself from
Rop for FilterActs
Rop for pooling
missing cuda code for rop and WIP test file
add warning for the test
Add matrix.cpp from cuda_convnet to fix some problem on Windows.

bbudescu found the real problem. I just made it work with out
compilation system.
ignore more file.
quick and dirty windows port

d:\kit\pthreads-win32-VC-x64\ is where the pthreadVC2.lib,
pthreadVC2.dll and pthread.h reside on my system. User should be able to
specify the header file location, library name and library location via
config attributes or environment variable.
add explicit pthread dependency only on windows
remove unused defines
removed unused casts
add dependencies required by matirx.cpp

this doesn't work on windows, because EPD doesn't deliver the import
libs for the mkl dlls (this would be ok if the compiler was mingw, but
nvcc only works with msvc).
config parameter for pthreads library

and some more dependencies required by matrix.cpp
remove matrix.cpp and matrix.h dependencies
Revert "removed unused casts"

This reverts commit fdde4a5688e382bf2b3bba62893e6941eafb38cd.
revert blas dependency of matrix.cpp
small correction
another small correction
bug fix