Fix for #1691, refresh artist failing for artists added from postprocessor
Prevent if checks on selects from returning True if no value

Stops issues where [None] return value would take code down wrong path
Don't keep trying to access db if locked out

If we can't get in after a timeout of 20(!) seconds, we're not going to
get in at all.
Make commit() inherent in DB access

Prevents code from failing before reaching commit() and deadlocking the
database - fixes #1438
Merge pull request #2 from mpnico/db-fixes

Db fixes