Various compilation fixes & a cupt-dbg package

The other day, I hit an issue similar to #1 and wanted to debug it.  Since there's no cupt-dbg package, I tried rebuilding and hit an ICE in GCC 4.6.  I removed the g++-4.6 requirement[0] and tried building with a newer version.  This produced a number of compilation problems, which I've fixed in this series of commits.  I also added a cupt-dbg package so that I can more easily debug things in the future.

I have another patch series I've made for the next branch which I'll submit soon.

[0]: It'd be nice if the CMake GCC check were modified to check for a version of GCC >= 4.6 instead of requiring 4.6.  I don't know enough about CMake to implement that, so I just removed the g++-4.6 check when I was doing my testing.