agent: add metadata validation for global units
Merge pull request #811 from jonboulle/811_agent_global_validation

global units: do some agent-level validation