Remove the caching in GitLocal.

This was unecessary complex and this could easily be added later by using a proper cache mechanism if needed.
Support for writing index files (untested)
code cleanups
Start testing the serialization of pack files

This is currently broken