Make sure to create internal resources.

This fixes a crash when logging in and out of worlds.
Provide dtor for class with virtual methods.
Added more Eclipse project files.
Shut down when the world is destroyed.
Use typedef instead of macros.
Removed unused includes.