Added singleton code for the engine class and a global pointer to an GloomEngine.  The ctor and dtor make sure this pointer is valid ( non null ) only when a GloomEngine exists.