Exiting the client now works properly

There's an annoying bug regarding the destruction of SDL resources which causes
an InvalidMemoryOperationError when the client closes now.