persistency bug fix: use only one DB connection, wait for it and allow to disconnect when done
persistence.disconnect() to terminate the app
Merge pull request #206 from dpolivaev/fixpersistency

persistency bug fix