medialibrary: Add a debug statement for storemodel row flushing
medialibrary: Automatically generate missing thumbnails

Completes the solution for bug #432661
medialibrary: Generate thumbnails in the background