ef_extend() extended the file bypassing the cache, which screws up the
cache if it's EFF_MEM. It fixed that by closing and reopening the
table. Cheesy, and worked only for file-backed tables.
Rewrite ef_extend() to remap the cache properly for EFF_MEM. While
there, simplify the !EFF_MEM case: steal a cache slot instead of
allocating a buffer.
Factor cache mapping out of ef_open() and ef_extend() into new
ef_remap_cache().