Fix camera errors and some memory errors.

keystate should not be freed anymore with SDL-2.0. Also SDL_SetRelativeMouseMode() is either broken or I am not using it correctly, but others have reported bugs as well. Camera works with sdl_warpMouseInWindow() though and everything is smooth now.