[pvr] added missing call to close the database. Also bail out
from the function earlier.
[pvr] remove unused code
[pvr] reduce code duplication in GetResumeString(), also bail out
earlier if the database cannot be opened