Fix ES freezing without input

And also hook up SDL joystick reinit when device removal or insertion is
detected.