toBucketKey

Transform this reference into a string that can be used as a bucket key.

This assumes all references are unique, as otherwise some buckets could collide.