Do not select invisible map objects

Use the current theme's rendering information to filter
out objects that aren't rendered.

Changed most of the legend text rendering code (ie that
which displayed the single values or ranges) to be
more 'functional'.