Fixing input and state reset issues with threaded builds.

Only change to ```FlxPhysState``` was to make the debug shape drawing happen in the ```draw()``` function instead of ```update()```. This was needed since it was causing a crash. I also moved around some code, that's why it seems like I made lots of changes in the file.