Make ContentStore handle tmpfile indirection instead of each subclass.

Also move the sha functionality from GitRepo to ContentStore.