Support deterministic names based on a callback.

This allows us to use, say, a slugfield to avoid leaking primary
keys.

Signed-off-by: Chris Lamb <chris@thread.com>