Adding functionality to FlxJoystickManager

Also added some safety checks to switching states for threaded builds.