ensure lua state is closed if gui script fails to start due to compile time error, fixes memory leak reported by waterwingz - trunk 3226