Rewrite main resampling loop (common and linear).

This removes a branch at a performance-sensitive point (in the middle
of the loop). In fate-swr-resample-s32p-8000-2626, this makes the code
about 10% faster. It also simplifies the loops, allowing us to rewrite
it in yasm at some later point.

The compensation_distance != 0 code and index < 0 code are still kind
of hairy. For compensation_distance != 0, this should likely be handled
in the caller, so that it calls swri_resample twice (once until the
dst_incr switch-point, and once with the remainder of the samples). For
index < 0, the code should probably be rewritten to break out of the
loop once sample_index >= 0, and then resume (e.g. as a tail-call) to
the common or linear resampling loops.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
swr/resample_template: prevent end_index from overflowing and add check for delta_frac overflow

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
fate: add simple test for async

This only checks that things havnt changed, the values provide little
help in determining if a change is good or bad.

Improvements welcome!

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tests: Replace fieldmatch test with pixfmt

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>