Refactor plugin creation methods into a common class.

Remove duplication from DotCiPluginAdapter and DotCiPluginNotifier.