Ignore upper 8 bit of countrycode when checking for PAL/NTSC system

Only the lower 8 bits are checked by the country code to system type check to
decide whether a PAL or NTSC system should be emulated. 8707bea8b73c
("1. Update msvc11 project file to visual studio 2012 (msvc11)") changed the type to
be checked to 16 bit and forgot to mask the upper 8 bits out when doing the
system check.
Ignore key repeats caused by the OS keyrepeat
Simply open joystick when needed in SDL2

The joysticks in SDL2 use reference counting and return just a new reference
when trying to reopen a joystick. SDL_JoystickOpened is not needed in SDL2.
add OSX build script and instructions
merged heads