This fixes two issues:
1) InitialiseWorld created the Chunk Storage before resolving the World Generator. If the World Generator could not be resolved, the chunk storage was never properly disposed, leading to threads still running in the background and the server never shutting down.
2) Some initialisation stages return to the main menu (via changing state to the main menu state). Since the headless server does not have a main menu, this should actually shut the server down. Implemented this using a StateChangeListener that forces the server to shut down whenever it changes to the main menu state in headless mode.
Added missing file.
Calling dispose on an assets will now automatically unregister it.

This patch makes all assets that extend from AbstractAsset
automatically unregister themself at the asset manager when they get
disposed.

This prevents module developers from causing memory leaks
when they only call dispose on the asset.
Don't let GLSL materials and shaders dispose themselfs completly at reload.
Make AbstractAsset implement isDisposed() so that it works always properly.
Create new NullPreftabs to ensure that they are not disposed.
Don't load data for disposed assets, log an error if it is tried.
Make the onDispose and onReload methods protected as they should not be called.
Warn about dispose calls in onReload and fix an issue the warning discovered.
Simplified some AsssetManager code.
Ensure that assets only get disposed once.
Do not skipp null field values when serializing components. Otherwise, server-side changes to fields that set them to null values (i.e. EntityRef.NULL) will NOT be synced to clients.
API to generate meshes from code
API to animate meshes from code
Added a command line option "-loadlastgame" that'll simply load the latest game on startup.
tweaks and fixes
more tweaks and fixes and some doc
Merge #1236 by @shartte - headless fixes
Display the current chunk in the debug overlay.
Fixed unit test display creation on my linux pc.