Switch over to the v2 API.
Remove trailing whitespace.
Some fixes to the code all around and make sure to initialize cublas along with the device.
Make it compile on cuda < 6.0 and add fix 0-size cases.
Merge pull request #1966 from abergeron/cublas_v2

Switch to cublas v2