1. Add database operation and error statistics to cdb

2. Cleanup cdb library code
3. Cleanup generator message statistics
4. Added test in cdb and viz message for the same