adpcm: Use a hash table to improve checking for duplicate samples

This lowers the run time from 158 to 21 seconds, for -trellis 8
with a 30 second sample on my machine.

This requires 64 KB additional memory.

Originally committed as revision 25768 to svn://svn.ffmpeg.org/ffmpeg/trunk
