read-cache: new extension "dirc" for recording/replaying index changes

This extension is to be used in split-index mode only. The extension
is stored in "index.ext" and works like a patch to "index". It records
what entry has been added, changed or removed. At load time, those
changes are applied to the in-memory index. Like a patch, it's
supposed to be much smaller to carry around than the final output,
which means faster update time. This patch is to introduce the
extension. The real meat will be added in later patches.
split-index: save the main index listing after reading

We need to keep this to identify updated or removed entries. The
position of each index entry is also saved in the entry itself, so we
know its position in the original listing. We need this quickly locate
the entries at load time without looking them up by name.
read-cache: save deleted entries in dirc extension

References to deleted entries are in dirc->original. We just need to
not free them, and mark them deleted. And mark that entry removal
should not lead to merging index.ext back to index.
read-cache: mark new entries for dirc extension

CE_ADDED is not a good fit because it does not differentiate replaced
and added entries. Moreover it's used as a temporary flag in
unpack_trees(). Make sure entry addition does not lead to merging
index.ext back to index.
read-cache: mark replaced entries for dirc extension
read-cache: export create_from_disk() for use in dirc extension

While at there, fix constness of "ondisk" and keep the type
ondisk_cache_entry to read-cache.c only.
read-cache: add index_entry_to_strbuf()
split-index: code for reading dirc extension

The extension consists of three separate parts for deleted, replaced
and added entries. Deleted entries are cheap: each one is represented
by one bit. Replaced entries are stored _without_ paths, which is
encoded in another bitmap. Added entries are stored no different the
main index.
split-index: code for writing dirc extension

We are not very strict at flagging CE_REMOVE, CE_UPDATE_IN_DIRC or
CE_ADD_IN_DIRC earlier. So we have to deal with the combination of
flags here. Detailed comments in code.

An observation is, deleting an entry, then adding it back is recorded
as "entry X is deleted, entry X is added", not "entry X is replaced".
This is simpler, with small overhead: a replaced entry is stored
without its path, a new entry is store with its path.
split-index: patch the index with data from dirc extension
test
1
force split-index mode on new indexes
Add TIME() macro for measuring how long a block is executed

Convenient macro to measure how long a code block takes. Support
nested timing. _Not_ meant to be actually used in official code.
TIME()