Fixed cuda skeleton code, corrected mistakes

Modified code so it works for gcc 4.7. Gcc 4.7 has an issue where if a
virtual destructor was defaulted, some subclassed defaulted destructors
have an incorrect exception safety level
Makefiles now support both CUDA and non CUDA usage