MediaLibrary: Check for early SQLite errors

Fix #142
4 jobs for handle_corrupt_db in 23 minutes and 1 second