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