[OSX] Improvements in gaming controller support

Manager will be initialized only when joystick support is enabled
Shutdown of gaming controller support will be always executed but only once
Potential crash because of incorrect atterm() functions order is avoided