thumbnail generation and disk caching

and, as an aside, move generating preview thumbnails for drafts off the main thread