metomi/rose#304: improve value macro

This addresses the <samp>range</samp> issue for derived types (#304). The value macro will now perform proper caching of known good and known bad value-metadata pairings, which should significantly speed up loading/editing a large number of similar configurations.

@arjclark, please review.