Make Key objects hashable

Ready for review/merge