thumbnail generation and disk caching

and, as an aside, move generating preview thumbnails for drafts off the main thread
Any reason not to use the jobqueue instead?