Various fixes for Palapeli
This is a series of commits to fix a number of problems with the program:
- Loading is very slow - file mtime comparisons don't work right, causing thumbnails to be rebuilt every time, and fdatasync is called unnecessarily for each puzzle
- The preview image isn't loaded correctly (shows up after the mtime comparison is fixed)
- The program can crash when using piece holders
- Sometimes piece images are left behind when moved to a piece holder