Add support for sparse entries.

This also should also improve the memory efficiency, but I didn't bother getting numbers on that, I needed it for the functionality anyway, it's just a happy coincidence. :smiley: 
Might it be better to use `find()` here, just in case `dense_entries_` somehow was missing an entry we could then `CHECK` ?