SDL Simulator: Get thread shutdown and properly handled and fix a minor memory leak...