[NUCCORE-1077] Make CachedId implement Comparable<CachedId> so we can
save SortedSet/SortedMap in the L2 cache