Report 404 on GET even if no pack file exists

Prior to this commit, failing to open the pack file directory would cause a 500
error, even if errno was simply ENOENT.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Add support for full repacking

Startup and lookup time grows linearly with the number of pack files, so there
has to be a way to collapse them.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Added end-to-end tests in a shell script

This script tries to verify the safety of doing repacks.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>