removeTouchesAtIndices = function(touches, indices) {
  var rippedOut = [];
  // use an unsafe downcast to alias to nullable elements,
  // so we can delete and then compact.
  var temp = touches;
  for (var i = 0; i < indices.length; i++) {
    var index = indices[i];
    rippedOut.push(touches[index]);
    temp[index] = null;
  }
  var fillAt = 0;
  for (var j = 0; j < temp.length; j++) {
    var cur = temp[j];
    if (cur !== null) {
      temp[fillAt++] = cur;
    }
  }
  temp.length = fillAt;
  return rippedOut;
}
TODO: Pool all of this.

Destroys `touches` by removing touch objects at indices `indices`. This is
to maintain compatibility with W3C touch "end" events, where the active
touches don't include the set that has just been "ended".

@param {Array<Touch>} touches Deserialized touch objects.
@param {Array<number>} indices Indices to remove from `touches`.
@return {Array<Touch>} Subsequence of removed touch objects.