added destroy db in abstract and call from magento config apply handler,...

... implements cleanup of db connection to avoid too many mysql connections for large settings files.