tempo: use 64-bit numbers to count samples

Use 64-bit numbers to count samples and segments in the tempo effect.

This fixes the bug reported in tracker item 3594822 by MrMod, where
  sox -V -S -r 192000 -n -n trim 0 3:15:00 tempo -q 0.9
would hang in an endless loop until memory exhaustion.