MediaLibrary: Check for early SQLite errors

Fix #142
5 jobs for master in 32 minutes and 4 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Test
passed #304826
amd64 debian
asan-ubsan

00:14:01

passed #304825
amd64 debian
coverage

00:18:00

79.9%
passed #304822
amd64 debian
linux

00:18:18

passed #304823
win32
win32

00:22:33

passed #304824
win64
win64

00:21:26