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: 
How could ```dense_entries_``` possibly be "missing an entry"? I'm not even sure what we could CHECK on (this is not a vector of pointers)?