function checkAvailability_(attendee, activity) {
  if (activity.capacity <= activity.roster.length) {
    return false;
  }
  let timesConflict = attendee.assigned.some(function(assignedActivity) {
    return !(assignedActivity.startAt.getTime() > activity.endAt.getTime() ||
      activity.startAt.getTime() > assignedActivity.endAt.getTime());
  });
  return !timesConflict;
}
Checks that an activity has capacity and doesn't conflict with previously assigned
activities.

@param {object} attendee - Attendee looking to join the activity
@param {object} activity - Proposed activity
@return {boolean} - True if attendee can join the activity