Stolen from https://askubuntu.com/questions/199110/how-can-i-instruct-nautilus-to-pre-generate-thumbnails/201997#201997
Changes:
- Updated to Python 3
- Added gi.require_version (to silence warning)
- Added multi-threading
- Added exception handling (so when thumbnailer crashes, it still keeps going)