SDB: fix the thread safe path (not really used)
Fix music segfault on rebuilding db

Use an Idler instead of a parallel thread to avoid race condition in python shelve, that is not thread safe.