strongly type attributes

**please review**
I really don't like this. The rest of the code becomes littered with `Attribute.toString(attribute.getKey())` just because `Key` happens to be implemented by a third-party class. There must be a cleaner solution. Our interfaces shouldn't be spoiled by our choice for the underlying classes. Can you subclass `Key`? Otherwise, maybe wrap it in our own `Key` class. Worst case, a `keyString()` method on `Attribute` will do.