Isolate temporary state while touching.

Previously we were trying to be clever and reuse the translate0 state while
touching; it’s simpler to just use a separate variable. Also, this commit now
restores the mousedown listener on touchend, just in case the device happens to
support both mouse and touch.