Make sure the .git directory exists before writing HEAD.

This closes #136.
Allow tuning the number of worker threads or using OIO.

Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>
Cache auto-completion results even if we don't use them.
Don't leak scanners when fetching suggestions from HBase.
Fetch the correct number of suggestions from HBase.

This bug had a subtle side-effect: the `break' in the while loop
was actually nested in a `for' loop, and was only breaking out of
the `for' loop, which had the weird consequence that we'd scan the
first 25 results from HBase, then because of the incorrect check
we'd iterate once more, get one more row from the next batch of
rows, then break out of the `for' loop, scan more rows, get the
first one in that batch, break out again, and so on and so forth
until the scanner reached the end key (generally rather quickly
given how the end key is crafted).

The net result is that we'd return the first 25 suggestions,
followed by 1 out of every 25 subsequent suggestion until the
end key.  This could confuse the web UI, as it relies on the
last suggestion returned to know whether to scan more.