Implement Key.compare_to_proto to check pb keys against existing.

Addresses sixth part of #451.