Add plugin group names to CONF

Plugins have no way of setting the name of their groups to CONF
so that they are available at discovery time, so setting them
up for them, using the get_opt_list hook.

Since plugins may pass an OptGroup object or a string, handle
both cases. Normalise strings with a '-' to '_'.

Added comments and docstring to document this.

Change-Id: I1afae0d1f9c4a6aec2742aaba4928cdde54b224f
2 files changed