(#979) - Destroy local db whith open changes

Check for the existence of database listener hash before
deleting the listener.

With a test.