Fix bug from Jacek - allocation and deallocation of host image not compatible.
cudaGLSetGLDevice is deprecated and isn't required anymore. Only use it pre CUDA 5.0.
Merge and fix another warning.