Use external OpaqueKey implementations

Supercedes #3866 

@flowerhack @dianakhuang @cpennington