gitk: Improve responsiveness while reading and layout out the graph
This restructures layoutmore so that it can take a time limit and do
limited amounts of graph layout and graph optimization, and return 1
if it exceeded the time limit before finishing everything it could do.
Also getcommitlines reads at most half a megabyte each time, to limit
the time it spends parsing the commits to about a tenth of a second.
Also got rid of the unused ncmupdate variable while I was at it.
Signed-off-by: Paul Mackerras <paulus@samba.org>