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!