Redesigned the thumbnail code for ePub

No more crashes when searching with the sidebar open, will probably add a pixbuf cache as well to speed it up even further.

The process which I earlier thought was not possible without separate jobs, work just fine as a single job, if I change the run mode of the thumbnail job, and incorporate a trylock() in case of epub.