Ensure that metric hooks are added idempotently.

This also removed the deprecated Playground#define method as it contributes to the confusion.