Bug fixes to preprocess_APS()

TAZKey was not being calculated in the same way as in Compiler.

The third case was incorrectly updating the previous waveform despite
trying to modify the following waveform.

And we were ignoring possible time/amp entries in creating padded
waveforms.
--BRJ and CAR