Fixed race conditions in multi-threaded dslash.
I believe the problems were due to the face that
packing could overlap with previous calls to the exterior Dslash kernels
and the fact that the interior dslash kernel was not guaranteed to execute
before the exterior dslash.

Also began to modify the tuning to make it thread safe.
Merge remote branch 'origin/quda-0.7' into quda-0.7
Added preprocessor check to ensure non-pthread build is correct.
Hacked up a fix for magma compilation problems.
Fixed a bug in staggered_invert_test.cpp