Fix performance problems in TOAST compressor. The management of
search lists was broken in such a way that only the most recent
instance of a given hash code would ever be searched, thus possibly
missing longer matches further back. Fixing this gave 5 to 10%
compression improvement on some text test cases. Additional small
tweaks to improve speed of inner loops a little bit. There is no
compatibility issue created by this change, since the compressed data
format and decompression algorithm don't change.