Fast index

Calling tellg() results in extremely slow indexing on a slow latency NFS. Just recording the number of characters that was read is much faster.


While the request construction went complicated than I wanted, only the last commit  	3eead1b is relevant.