resample: fix avresample_get_delay() return value

The correct "next" input sample is not the first sample of the
resampling buffer, but the center sample of the filter_length-sized
block at the beginning.

CC:libav-stable@libav.org
resample: split the nearest neighbour path into a separate function pointer
resample: reindent
resample: drop useless abs()

negative sample_index is handled in the block above.
resample: add initial padding explicitly

This simplifies the code, since we do not have to deal with a possibly
negative source index anymore.
resample: split linear into its own function