Fix crash on shutdown in Qt.

Scoped pointers need to destruct first, or else we'll try to access emulator internals
within their destructors.
Avoid a char * for constant strings.
Merge pull request #197 from unknownbrackets/qt-fix

Fix crash on shutdown in Qt