improved sidebar plugin sources tab to now show the plugin icon; this
can be either the plugin-specific icon or one of the generic plugin icons
depending on the plugin-type. cleaned up TW markup using macros
and indentation, so that the function should be easier to understand now.