ImageLoadThread: don't treat all gifs as being animated

If a gif only has one image then fall back to loading it as a normal image.
This fixes the bad flicker of some gif images especially remote ones in button
lists.

Fixes #11883.

(cherry picked from commit bd0b51f1676f8e8b62e4b552bd48ccecb5378d9f)