Support webkit gamepad api

The Gamepad API is here: https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html . It states 

    index of type long, readonly
        The index of the gamepad in the Navigator. When multiple gamepads are connected to a user agent,
        indices must be assigned on a first-come, first-serve basis, starting at zero. If a gamepad is
        disconnected, previously assigned indices must not be reassigned to gamepads that continue to be
        connected. However, if a gamepad is disconnected, and subsequently the same or a different gamepad
        is then connected, index entries must be reused.

The rationale here is that the index where the Gamepad appears in the array is its unique id, and this index where it is present will never change. I think we should return `navigator.getGamepads().length` here so that the following code pattern will work:

    for(int i = 0; i < emscripten_get_num_gamepads(); ++i)
    {
      EmscriptenGamepadEvent e;
      EMSCRIPTEN_RESULT r = emscripten_get_gamepad_status(i, &e);
      if (r == EMSCRIPTEN_RESULT_SUCCESS) {
        // Access fields of e.
      } else if (r == EMSCRIPTEN_RESULT_NO_DATA) {
        printf("Gamepad disconnected! Reconnect gamepad to continue play!\n");
      } else {
        printf("Some error!\n");
      }
    }

That allows user code to assign a unique id index to a gamepad, and then always keep reading that gamepad from the same index. If the code for some reason wants to know the number of actually connected gamepads, then it can iterate through the array itself and accumulate the number of entries that return SUCCESS instead of NO_DATA.