rate: don't hang if more than 2^31 output samples

The rate effect used to hang in an endless loop (until memory
exhaustion) when the number of output samples exceeded 2^31 (on
"normal" platforms; depending on size and signedness of size_t
and int), as in this example:
  sox -V -S -n -n trim 0 3:10:00 rate 192000
Use 64-bit numbers for counting samples, and don't subtract unsigned
numbers without checking.

Reported and analyzed by MrMod in tracker item 3592482. This same
problem is already fixed in the post-14.4.1 branch (commit c20cfab;
in conjunction with commit eb20581 for the 64-bit numbers).
Update changelog