[DB][DBAgentFactory] Move a function to create a DBAgent instance to a f...

...actory class.

Previously, a class: DB directly create a DBAgent instance. However, I will add a feature to select the actual instance of DBAgent to be created by a configuration file.

So the creation should be consolidated to a factory class.