read-cache: allow to keep mmap'd memory after reading
index-helper: new daemon for caching index and related stuff

Instead of reading the index from disk and worrying about disk
corruption, the index is cached in memory (memory bit-flips happen
too, but hopefully less often).

The biggest gain is not having to verify the trailing SHA-1, which
takes lots of time especially on large index files. But this also
opens to optimize further, we could create an in-memory format that's
essentially the memory dump of the index to eliminate most of
parsing/allocation overhead. It also allows to cache non-index info
such as name hash.

The shared memory's name folows the template "git-<something>-<SHA1>"
where <SHA1> is the trailing SHA-1 of the index file. <something> is
"index" for cached index files. If such shared memory exists, it
contains the same index content as on disk. The content is already
validated by the daemon and git won't validate it again (except
comparing the trailing SHA-1s).

Git can poke the daemon to tell it to refresh the index cache, or to
keep it alive some more minutes via UNIX signals. It can't give any
real data directly to the daemon. Real data goes to disk first, then
the daemon reads and verifies it from there.

$GIT_DIR/index-helper.pid contains a reference to daemon process. The
file's mtime is updated every time it's accessed (or should be updated
often enough). Old index-helper.pid is considered stale and ignored.

There's an obvious "hole" here. If $USER is compromised, shared memory
could be modified. But then they can already modify $GIT_DIR/index. A
more realistic risk is index-helper produces corrupt shared
memory. But the same can be said for bugs in read-cache.c. So more
careful there..
index-helper: add Windows support

Windows supports shared memory, but a bit different that POSIX
shm. The most noticeable thing is there's no way to get the shared
memory's size from the reader, and wrapping fstat to do that would be
hell. So the shm size is added near the end, hidden away from shm
users (storing it in headers would cause more problems with munmap,
storing it as a separate shm is even worse).

PostMessage is used instead of UNIX signals for
notification. Lightweight (at least code-wise) on the client side.
daemonize(): set a flag before exiting the main process

This allows signal handlers and atexit functions to realize this
situation and not clean up.
index-helper: add --detach