#546 - metadata macro option

This implements a new `macro` option in the metadata, used by the config editor. It also makes the interface to calling macros slightly more flexible (better support for macro classes with both transform and validate methods).

@arjclark, please review.