Prevent nemo trying to generate a thumbnail more than 5 times before

giving up, instead of getting stuck in an endless loop.  The thumbnail will
still try to regenerate when the file is replaced or nemo is restarted.

This is a workaround until the root cause of this issue is found.. possibly
upstream in gnome-desktop

Ref #346 and #349