listeners: adding singularity.configuration.updated

so that the application can react to changes in the runtime cfg
singularity & db: configuration persistence

also moved initialization of app.db into singularity, updated test