Implement example of proposed new plugin structure

As discussed in #5769.  Allows for extending plugins and removes code the current duplication with code common to plugins.  Some functionality in init() for tables could be moved to sub-functions to allow for better extension of the plugin, but currently defaults() is the example.