Refactor appendtone signature
Refactor appendtone signature

Creates an "outbuf" struct with all the state needed for rendering
pulses into an audio buffer. Calls to appendtone take a pointer to
this struct instead of four separate args.

This patch shouldn't affect behavior at all. It is a step toward
providing band-limited waveform generation (see #4).

Also uses doubling approach to reallocate audio buffer, one of the
existing todo items.

datajerk/c2t,datajerk/c2t,datajerk/c2t