Initial SDL Joystick support via Gamepad API

This PR implements basic polling-based joystick support for SDL. I have also written unit tests for the new functionality. :smile: 

Here is a simple test program that you can easily compile to verify its functionality:
```c
#include "SDL.h"
#include <stdio.h>
#include <stdlib.h>
#include "emscripten/emscripten.h"

void list_joysticks()
{
  for (int i=0; i<SDL_NumJoysticks(); i++) {
    if (!SDL_JoystickOpened(i)) {
      SDL_Joystick* joy = SDL_JoystickOpen(i);
      if (joy) {
        printf("New joystick found!\n");
        printf("Joystick %i\n", i);
        printf("Name: %s\n", SDL_JoystickName(i));
        printf("Number of Axes: %d\n", SDL_JoystickNumAxes(joy));
        printf("Number of Buttons: %d\n", SDL_JoystickNumButtons(joy));
        printf("Number of Balls: %d\n", SDL_JoystickNumBalls(joy));
      }
    }
  }
}


void main_loop() {
  list_joysticks();
  SDL_Event event;
    while (SDL_PollEvent(&event)) {
      switch(event.type) {
      case SDL_JOYAXISMOTION:
        printf("Joystick %d axis %d value %d\n",
               event.jaxis.which, event.jaxis.axis, event.jaxis.value);
        break;
      case SDL_JOYBUTTONDOWN:
      case SDL_JOYBUTTONUP:
        printf("Joystick %d button %d %s\n",
               event.jbutton.which, event.jbutton.button,
               event.jbutton.state == SDL_PRESSED ?
               "pressed" : "released");
        break;
      }
    }
}

int main(int argc, char** argv)
{
  if (SDL_Init(SDL_INIT_JOYSTICK | SDL_INIT_VIDEO) < 0 ) {
    fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
    return 1;
  }
  atexit(SDL_Quit);

  SDL_JoystickEventState(SDL_ENABLE);

  emscripten_set_main_loop(main_loop, 0, 1);

  return 0;
}
```

Despite setting the `dom.gamepad.enabled` flag in Firefox (and restarting Firefox, in case that's required), I was unable to get Firefox to detect my XBox 360 gamepad. However, the code functions appropriately in Chrome.