Can write trees and commits in a packfile.

Writing a simple packfile containing a blob, a tree referencing that blob, and
a commit referencing that tree works.

Support to gnerate the loose format is also added because it is necessary in
order to compute the SHA1 sums identifying objects. In the example above, it is
used to compute the tree reference, needed to create the commit object.