Support parsing timezone offsets.

Note that the resulting Date object can only be in the local timezone
(or UTC), due to the limitations of JavaScript Dates.

Fixes #1494.
Support simultaneous zooming on multiple targets.

Fixes #1497, where a zoom gesture would break if a touch was started
outside the target during a gesture.

Each zoom gesture now only considers touches that were started on its
associated target element.  This allows multiple zoom gestures to occur
at once without conflicts.
Remove locations on touchend.

This avoids a potential bug where a touch identifier might be reused in
another gesture, but could still be referenced in locations0, thus
causing problems for the old gesture on touchmove.
Use distance instead of d3.event.scale.

Unlike d3.event.scale, which is a single value provided by the browser
(usually an average based on the position of all touches), we can
compute separate distances for each zoom gesture and its target,
allowing multiple gestures to occur simultaneously.
Optimise.

This block is only necessary if there are remaining touches, because
otherwise the gesture has ended and we remove this closure along with
locations0.  Thanks, @mbostock!
Rename for consistency.
Ensure that touch{move,end} listeners are removed.

Previously, if there were globally-active touches remaining, a given
zoom gesture was not ended even if locations0 was empty.  This fixes the
problem by checking to see if locations0 is empty.  If so, the gesture
is ended.
Tweak return value on touchend.

For consistency, always return undefined here.
Add a few comments.
If present, use changedTouches[0] for d3.mouse.

Normally d3.mouse(this) is equivalent to d3.touches(this)[0] because the clientX
and clientY properties of the event and the first touch are the same. However,
on touchend the touches list is empty, and the clientX and clientY are 0! So
instead it seems safer to use the position of the first changed touch for the
default location of a touch event.
Remove redundant code in d3.svg.brush.

Now that d3.mouse does the “right thing” for touch events, we don’t need code
that handles touch events specially.
Merge branch 'time-parse-zone' into 3.3.3
Merge branch 'zoom-multiple' into 3.3.3
Merge branch '3.3.3'
Fix d3.mouse touch fallback for HTML targets.
Remove dead code.

This line doesn’t appear to do anything useful, since the parent node is
now saved in the closure.  Previously, this line checked to see if
target.parentNode was null, since this would cause a crash when
computing the relative position.
Fix point-in-polygon for multiple polar rings.

Instead of detecting if any single polygon ring winds around a pole, we
consider the cumulative winding of all polygon rings together.  This is
consistent with the area calculation, which considers the cumulative
area total of all rings.

This fixes #1521: an issue with the Hammer Retroazimuthal projection,
which uses such a polygon with two rings, covering most of the globe.

In addition, drop the special handling of points at the south pole,
which might have been there to pass an incorrect test: a CCW triangle
touching the south pole, which was probably incorrectly thought to be
clockwise.  This fixes an issue with a “stripe” polygon rotated so that
a point is at the south pole, mentioned in #1453.
Use the scale as the tick key function.

Previously we were using string coercion as the key function for axis ticks.
However, when the stringified value of the tick does not fully capture the
representation (such as a date with millisecond precision, whose string form
only has second precision; fixes #1529), string coercion is insufficient.

Fortunately, there is an equivalently-simple key function for tick identity: the
scale! If the scale does not return a unique position for the given tick, then
the tick would be overlapping, so it serves perfectly as the key function.
Fix crash in ticks for empty d3.time.scale domain.

Fixes #1525. This was only an issue because the domain is extended by one
millisecond when it is empty (for an inclusive upper bound).
Merge remote-tracking branch 'origin/fix-geo-pip' into 3.3.4